diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index 96f7cd7b4f..8786bce8dc 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -475,12 +475,12 @@ void KWin::Scripting::start() connect(watcher, SIGNAL(finished()), this, SLOT(slotScriptsQueried())); KSharedConfig::Ptr _config = KGlobal::config(); QMap pluginStates = KConfigGroup(_config, "Plugins").entryMap(); - watcher->setFuture(QtConcurrent::run(this, &KWin::Scripting::queryScriptsToLoad, pluginStates)); + KService::List offers = KServiceTypeTrader::self()->query("KWin/Script"); + watcher->setFuture(QtConcurrent::run(this, &KWin::Scripting::queryScriptsToLoad, pluginStates, offers)); } -LoadScriptList KWin::Scripting::queryScriptsToLoad(QMap &pluginStates) +LoadScriptList KWin::Scripting::queryScriptsToLoad(QMap &pluginStates, KService::List &offers) { - KService::List offers = KServiceTypeTrader::self()->query("KWin/Script"); LoadScriptList scriptsToLoad; foreach (const KService::Ptr & service, offers) { diff --git a/scripting/scripting.h b/scripting/scripting.h index d6d56db20c..d48b3699b2 100644 --- a/scripting/scripting.h +++ b/scripting/scripting.h @@ -23,6 +23,7 @@ along with this program. If not, see . #define KWIN_SCRIPTING_H #include +#include #include #include @@ -213,7 +214,7 @@ private Q_SLOTS: void slotScriptsQueried(); private: - LoadScriptList queryScriptsToLoad(QMap &pluginStates); + LoadScriptList queryScriptsToLoad(QMap &pluginStates, KService::List &); }; }