fix threaded queryScriptsToLoad()

REVIEW: 104866
This commit is contained in:
Thomas Lübking 2012-05-05 17:36:30 +02:00
parent a79eacaed7
commit e274c297b9
2 changed files with 5 additions and 6 deletions

View file

@ -294,14 +294,13 @@ void KWin::Scripting::start()
// perform querying for the services in a thread
QFutureWatcher<LoadScriptList> *watcher = new QFutureWatcher<LoadScriptList>(this);
connect(watcher, SIGNAL(finished()), this, SLOT(slotScriptsQueried()));
watcher->setFuture(QtConcurrent::run(this, &KWin::Scripting::queryScriptsToLoad));
}
LoadScriptList KWin::Scripting::queryScriptsToLoad()
{
KSharedConfig::Ptr _config = KGlobal::config();
KConfigGroup conf(_config, "Plugins");
watcher->setFuture(QtConcurrent::run(this, &KWin::Scripting::queryScriptsToLoad, conf));
}
LoadScriptList KWin::Scripting::queryScriptsToLoad(KConfigGroup &conf)
{
KService::List offers = KServiceTypeTrader::self()->query("KWin/Script");
LoadScriptList scriptsToLoad;

View file

@ -185,7 +185,7 @@ private Q_SLOTS:
void slotScriptsQueried();
private:
LoadScriptList queryScriptsToLoad();
LoadScriptList queryScriptsToLoad(KConfigGroup &conf);
};
}