Homerun and single-runner runners

Marco Martin notmart at gmail.com
Wed Feb 13 13:10:40 UTC 2013


On Wednesday 13 February 2013, Aurélien Gâteau wrote:
> On Wed, 13 Feb 2013 12:45:33 +0100, Marco Martin wrote:
> >>     if (query.contains(placeHolder)) {
> >>     
> >>         return query.replace(placeHolder, term);
> >>     
> >>     } else {
> >>     
> >>         return query + ' ' + term;
> >>     
> >>     }
> >> 
> >> }
> >> 
> >> Is there a better way to do this?
> > 
> > uhm... RunnerManager::launchQuery(const QString &term, const QString
> > &runnerId);
> > 
> > how the query should be done is something that who calls must know
> > the
> > syntax... i don't see many ways around?
> 
> Homerun code indeed uses RunnerManager::launchQuery(). The code I
> quoted is
> the one responsible for creating the "term" argument of launchQuery().
> 
> >> 3. I noticed some runners advertise single-runner mode but do not
> >> define a
> >> default syntax. Is it a bug or is there a reason for that?
> > 
> > hmm, example? that indeed sounds wrong, should see the cases tough.
> 
> Here is the result of some quick grepping:
> 
> - kde-workspace
>   - locations
>   - nepomuksearch
>   - powerdevil
>   - recentdocuments
>   - services
>   - shell
>   - webshortcuts
> 
> - kdeplasma-addons
>   - mediawiki

some like locations and recent documents should indeed have a default query.

things like mediawiki, webshortcuts and nepomuk no, is just saying "use only 
nepomuk" but the concept of "default query" doesn't make sense there


-- 
Marco Martin


More information about the Plasma-devel mailing list