Dataengines in native runners

Nicolas Alvarez nicolas.alvarez at gmail.com
Mon Jul 4 01:33:46 CEST 2011


Hello Plasma world,

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.

I wrote a dataengine for projects.kde.org, and I'm now writing a runner to 
go with it, and honestly it seems easier to make the runner use my PkoLoader 
class directly instead of going through the dataengine (which uses the same 
class).

I'm sure dataengines would make things much simpler for scripted runners, 
since authors wouldn't want to do the complex data retrieval, or may even be 
unable to do it (eg. if there are no bindings for KFilePlacesModel). But is 
there any point if the "user" of the dataengine would be C++ too?

I'm also having some problems mapping my data to the data model of 
dataengines, and I see little documentation on "good practices" about this; 
but that's probably a topic for another thread.

-- 
Nicolas




More information about the Plasma-devel mailing list