Data source connection/disconnection and force update

Shawn Starr shawn.starr at rogers.com
Thu Feb 12 00:54:06 CET 2009


I have some issues with Plasma Dataengine API with regard to force updating a 
source.

The use case is this:

I load an applet and set the default update interval to every 30 minutes. 
However, being impatient, I decide I want to get the refreshed information 
quicker, the applet has a 'Update Now' context menu option, when clicking 
this, the engine is supposed to do a force update of the data instead of 
waiting 30 minutes to return the new updated data.

The problem is this:

Plasma does not allow a existing connected source to adjust the polling 
timeout for updates. All those methods are protected and cannot be used by a 
dataengine to adjust its own update timeout periods.

Right now, when you click this 'Update Now' context menu, plasma just returns 
the old data, the dataengine thus does not attempt to fetch new data from the 
external source. 

What is the solution? While it's nice that plasma controls all the automatic 
polling, it does not seem to allow for instant updates.

Thanks, 
Shawn.


More information about the Plasma-devel mailing list