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
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to