enabledSingleModeRunnerIds() becomes singleModeAdvertisedRunnerIds()

because all runners can be lanched alone, but only a few are accessible like that with global shortcuts 

svn path=/trunk/KDE/kdelibs/; revision=1062006
This commit is contained in:
Marco Martin 2009-12-13 14:57:06 +00:00
parent bf19913adb
commit f38e7f4faf
2 changed files with 9 additions and 9 deletions

View File

@ -187,7 +187,7 @@ public:
pluginConf = KConfigGroup(KGlobal::config(), "Plugins"); pluginConf = KConfigGroup(KGlobal::config(), "Plugins");
} }
enabledSingleRunnerIds.clear(); advertiseSingleRunnerIds.clear();
foreach (const KService::Ptr &service, offers) { foreach (const KService::Ptr &service, offers) {
//kDebug() << "Loading runner: " << service->name() << service->storageId(); //kDebug() << "Loading runner: " << service->name() << service->storageId();
@ -206,10 +206,10 @@ public:
const bool selected = loadAll || const bool selected = loadAll ||
(description.isPluginEnabled() && (noWhiteList || whiteList.contains(runnerName))); (description.isPluginEnabled() && (noWhiteList || whiteList.contains(runnerName)));
const bool singleQueryModeEnabled = service->property("X-Plasma-SingleRunnerQueryMode", QVariant::Bool).toBool(); const bool singleQueryModeEnabled = service->property("X-Plasma-AdvertiseSingleRunnerQueryMode", QVariant::Bool).toBool();
if (singleQueryModeEnabled) { if (singleQueryModeEnabled) {
enabledSingleRunnerIds.insert(runnerName, description.name()); advertiseSingleRunnerIds.insert(runnerName, description.name());
} }
//kDebug() << loadAll << description.isPluginEnabled() << noWhiteList << whiteList.contains(runnerName); //kDebug() << loadAll << description.isPluginEnabled() << noWhiteList << whiteList.contains(runnerName);
@ -348,7 +348,7 @@ public:
QTimer matchChangeTimer; QTimer matchChangeTimer;
QTimer delayTimer; // Timer to control when to run slow runners QTimer delayTimer; // Timer to control when to run slow runners
QHash<QString, AbstractRunner*> runners; QHash<QString, AbstractRunner*> runners;
QHash<QString, QString> enabledSingleRunnerIds; QHash<QString, QString> advertiseSingleRunnerIds;
AbstractRunner* currentSingleRunner; AbstractRunner* currentSingleRunner;
QSet<FindMatchesJob*> searchJobs; QSet<FindMatchesJob*> searchJobs;
QSet<FindMatchesJob*> oldSearchJobs; QSet<FindMatchesJob*> oldSearchJobs;
@ -474,9 +474,9 @@ QList<AbstractRunner *> RunnerManager::runners() const
return d->runners.values(); return d->runners.values();
} }
QStringList RunnerManager::enabledSingleModeRunnerIds() const QStringList RunnerManager::singleModeAdvertisedRunnerIds() const
{ {
return d->enabledSingleRunnerIds.keys(); return d->advertiseSingleRunnerIds.keys();
} }
QString RunnerManager::runnerName(const QString &id) const QString RunnerManager::runnerName(const QString &id) const
@ -484,7 +484,7 @@ QString RunnerManager::runnerName(const QString &id) const
if (runner(id)) { if (runner(id)) {
return runner(id)->name(); return runner(id)->name();
} else { } else {
return d->enabledSingleRunnerIds.value(id, QString()); return d->advertiseSingleRunnerIds.value(id, QString());
} }
} }

View File

@ -110,10 +110,10 @@ class PLASMA_EXPORT RunnerManager : public QObject
QList<AbstractRunner *> runners() const; QList<AbstractRunner *> runners() const;
/** /**
* @return the names of all single query mode enabled runners * @return the names of all runners that advertise single query mode
* @since 4.4 * @since 4.4
*/ */
QStringList enabledSingleModeRunnerIds() const; QStringList singleModeAdvertisedRunnerIds() const;
/** /**
* Retrieves the current context * Retrieves the current context