Homerun sources and Plasma runners

Marco Martin notmart at gmail.com
Wed Nov 21 19:52:30 UTC 2012


On Wednesday 21 November 2012, Aurélien Gâteau wrote:
> Trying to map the way sources work to runners, instead of having a runner
> calling RunnerContext::addMatches(), a runner would have a createModel()
> method which would be called by RunnerContext or RunnerManager to reach the
> runner data.
> This gives runners the ability to use whatever model class is more
> appropriate: a model inheriting QAbstractListModel, or a simple
> QStandardItemModel, or maybe a proxy model on top of an existing model
> provided by a library, etc.

why two runners should use a different model? their data structure is the 
same..


aanyways, thinking about it, it probably make sense having different models 
for very different tasks (filesystem navigation should really be done by 
kdirmodel for instance, and the qml bindings for in in plasma-mobile are 
really just an handful of lines)

so basically a functionality set would be expressed by providing a different 
model component.
search or simple results that can be expressed with a query -> krunner
filesystem -> kdirmodel
browsing applications-> some model based upon kservice

on all of them, an entry can be bookmarked if it provides a role with a valid 
url (to a file, a website, a folder, a desktop file, whatever)

that seems pretty expressive and just reuses existing technologies

Cheers,
Marco Martin


More information about the Plasma-devel mailing list