Dataengines ...anywhere

Nicolas Alvarez nicolas.alvarez at gmail.com
Sun Jul 10 05:39:43 CEST 2011


Aaron J. Seigo wrote:
> On Sunday, July 3, 2011 20:33:46 Nicolas Alvarez wrote:
>> Is there any native-code krunner that uses a dataengine to get its
>> information? It seems odd that, for example, we have a perfectly good
>> 'places' dataengine but the runner accesses KFilePlacesModel directly
>> instead. Same for activities and windows.
> 
> the reason is two fold:
> 
> * DataEngine and Runner represent the resulting data rather differently
> and offering very different options as to what can be done with the
> results. iow, the use cases are fundamentally different. using one from
> the other, while possible, is therefore always going to be more awkward
> than simply using a shared implementation for getting to the actual data.

I see... As a *user* of Plasma, I thought reusing data-fetching code in both 
a runner and a plasmoid was one of the advantages of dataengines.


Anyway, even if I sort-of know the answer, this naturally leads me to the 
question of "what is the actual use-case of dataengines?". In particular, 
what's the advantage/rationale to the model of sources + keys + arbitrary 
QVariants as values + procedural 'services'?

-- 
Nicolas




More information about the Plasma-devel mailing list