Querying the dict dataengine

Aaron J. Seigo aseigo at kde.org
Thu Aug 20 10:32:50 CEST 2009


On Monday 17 August 2009, alan moore wrote:
> The delay wasn't really the problem, but rather the initial bogus
> output.  I guess I'm thinking of this like a database query -- ask a
> question, wait a bit, get an answer.  I can see how connectSource()
> makes sense in a situation where you have a constant stream of data you
> want to tap into and pipe out to a widget, but is there not a mechanism
> for simply doing a one-off query?  I thought that's what the query()
> method was for, but that wasn't working out either.

well, no. because in this case the result is fetched asynchronously. which 
means the only way to do what you want would be to block all of plasma to wait 
for the data. that's obviously not good :)

query() doesn't _really_ provide a synchronous interface, it just provides 
synchronous access to data that already exists. not great in that sense, but 
useful at times.

another thing that's a bit annoying is that we have no way to tell currently 
between between "empty set of data is the correct answer" and "empty set of 
data right now, will be filled in later", so in the case of the async call 
there's always a first call with an empty data set.

i think i'm going to try a patch in trunk where we don't send the initial data 
out if the data set is empty on creation and see if that trips anything up. i 
think it will probably match people's expectations better.....

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090820/62f43dcd/attachment.sig 


More information about the Plasma-devel mailing list