fix threaded queryScriptsToLoad()
REVIEW: 104866
This commit is contained in:
parent
a79eacaed7
commit
e274c297b9
2 changed files with 5 additions and 6 deletions
|
@ -294,14 +294,13 @@ void KWin::Scripting::start()
|
||||||
// perform querying for the services in a thread
|
// perform querying for the services in a thread
|
||||||
QFutureWatcher<LoadScriptList> *watcher = new QFutureWatcher<LoadScriptList>(this);
|
QFutureWatcher<LoadScriptList> *watcher = new QFutureWatcher<LoadScriptList>(this);
|
||||||
connect(watcher, SIGNAL(finished()), this, SLOT(slotScriptsQueried()));
|
connect(watcher, SIGNAL(finished()), this, SLOT(slotScriptsQueried()));
|
||||||
watcher->setFuture(QtConcurrent::run(this, &KWin::Scripting::queryScriptsToLoad));
|
|
||||||
}
|
|
||||||
|
|
||||||
LoadScriptList KWin::Scripting::queryScriptsToLoad()
|
|
||||||
{
|
|
||||||
KSharedConfig::Ptr _config = KGlobal::config();
|
KSharedConfig::Ptr _config = KGlobal::config();
|
||||||
KConfigGroup conf(_config, "Plugins");
|
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");
|
KService::List offers = KServiceTypeTrader::self()->query("KWin/Script");
|
||||||
LoadScriptList scriptsToLoad;
|
LoadScriptList scriptsToLoad;
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ private Q_SLOTS:
|
||||||
void slotScriptsQueried();
|
void slotScriptsQueried();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LoadScriptList queryScriptsToLoad();
|
LoadScriptList queryScriptsToLoad(KConfigGroup &conf);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue