From 98c7ed70974dc993901cc52f168830d1fb2dcab2 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 9 May 2008 23:14:00 +0000 Subject: [PATCH] more signalf friendly svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=806084 --- runnermanager.cpp | 12 +++++++++++- runnermanager.h | 16 +++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/runnermanager.cpp b/runnermanager.cpp index 00a07cdb1..e5063ac2b 100644 --- a/runnermanager.cpp +++ b/runnermanager.cpp @@ -380,7 +380,12 @@ void RunnerManager::run(const QueryMatch &match) } } -void RunnerManager::launchQuery(const QString & term, const QString & runnerName) +void RunnerManager::launchQuery(const QString &term) +{ + launchQuery(term, QString()); +} + +void RunnerManager::launchQuery(const QString &term, const QString &runnerName) { if (term.isEmpty()) { reset(); @@ -416,6 +421,11 @@ void RunnerManager::launchQuery(const QString & term, const QString & runnerName } } +bool RunnerManager::execQuery(const QString &term) +{ + return execQuery(term, QString()); +} + bool RunnerManager::execQuery(const QString &term, const QString &runnerName) { if (term.isEmpty()) { diff --git a/runnermanager.h b/runnermanager.h index 20cc7d635..5db892e89 100644 --- a/runnermanager.h +++ b/runnermanager.h @@ -73,6 +73,11 @@ class PLASMA_EXPORT RunnerManager : public QObject */ void run(const QueryMatch &match); + /** + * @return the current query term + */ + QString query() const; + public Q_SLOTS: /** * Launch a query, this will create threads and return inmediately. @@ -82,7 +87,12 @@ class PLASMA_EXPORT RunnerManager : public QObject * @arg term the term we want to find matches for * @arg runner optional, if only one specific runner is to be used */ - void launchQuery(const QString &term, const QString & runnerName=QString()); + void launchQuery(const QString &term, const QString & runnerName); + + /** + * Convenience version of above + */ + void launchQuery(const QString &term); /** * Execute a query, this method will only return when the query is executed @@ -96,9 +106,9 @@ class PLASMA_EXPORT RunnerManager : public QObject bool execQuery(const QString &term, const QString & runnerName); /** - * @return the current query term + * Convenience version of above */ - QString query() const; + bool execQuery(const QString &term); /** * Reset the current data and stops the query