Bug 251459 - Plasma::DataEngine::connectSource does not connect on a 2nd call
Summary: Plasma::DataEngine::connectSource does not connect on a 2nd call
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks: 202444
  Show dependency treegraph
 
Reported: 2010-09-16 16:23 UTC by Andreas Fink
Modified: 2012-06-03 18:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test applet (2.09 KB, application/x-bzip-compressed-tar)
2010-09-16 16:23 UTC, Andreas Fink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Fink 2010-09-16 16:23:29 UTC
Created attachment 51720 [details]
Test applet

Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

Attached is the test applet. Basically i connect to the systemmonitor dataEngine and the source "system/uptime". Then after 6 seconds this is disconnected again. And then 3 seconds later it is connected again. However connecting the 2nd time seems to fail, since my dataUpdated function is never ever called again...

also in TestApplet::init() I connect then disconnect and connect again, to show that the dataUpdated function needs to be called at least once to produce this bug (i.e. connecting --> disconnecting --> connecting works fine if dataUpdated had no chance to be called)

Another issue I realized is that the constructor gets called as often as I started plasmoidviewer with this plasmoid, i.e. if I started plasmoidviewer already 5 times, than 5 times my constructor is called (but only once the init() method). Really??? are u serious with this behaviour? The constructor gets even called if I start plasmoidviewer with a completely different plasmoid (lets say "plasmoidviewer tasks"). I.e. do sth like this:

plasmoidviewer test_applet
plasmoidviewer test_applet
plasmoidviewer test_applet
plasmoidviewer tasks

Really I have no idea why the tasks plasmoid needs to call the constructor for test_applet... This must be a bug???

Reproducible: Always

Steps to Reproduce:
Download attached program
Install the plasmoid
Start it inside plasmoidviewer
Wait 6 seconds until the source is disconnected (6 times dataUpdated should be printed)
Wait 3 seconds until source is connected again (some message appears on std::cout)
Wait for dataUpdated to be called again (but don't wait too long, coz it won't happen ;) )

Actual Results:  
dataUpdated is not called after the second connectSource

Expected Results:  
dataUpdated should be called again
Comment 1 Aaron J. Seigo 2010-09-16 19:20:25 UTC
"Really??? are u serious with this behaviour?"

i could ask the same about your bug report ;) c'mon, keep it collegial, ok?

that said, the plasmoidviewer bug has already been fixed and backported. reconnecting to sources in Plasma::DataEngine does indeed work (i know because i have doing exactly that all day yesterday and today, as it happens). this is actually a bug in the system-monitor engine, and which is being worked on.
Comment 2 Andreas Fink 2010-09-16 23:53:24 UTC
Sorry if you felt offended, I did not intend to insult someone (was just a bit wondering why this happened, because in my real applet it crashed and I first could not understand why).

Is there a bug report for the problem with the systemmonitor data engine, because I could not find it?
Comment 3 Aaron J. Seigo 2010-09-17 19:25:53 UTC
"Is there a bug report for the problem with the systemmonitor data engine,
because I could not find it?"

no, if there was we would have marked this one as a duplicate. i put Alex on the cc list for the report as he was working on a fix for this.
Comment 4 Alex Merry 2010-09-20 02:21:23 UTC
SVN commit 1177289 by alexmerry:

Fix updating of the source when it was connected to before being populated.

BUG: 251459



 M  +12 -0     systemmonitor.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1177289
Comment 5 Alex Merry 2010-09-20 02:23:51 UTC
SVN commit 1177290 by alexmerry:

Backport r1177289: Fix updating of the source when it was connected to before being populated.

CCBUG: 251459



 M  +12 -0     systemmonitor.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1177290