Reparse configuration before (un)loading scripts
When the scripting KCM triggered a loading of a script it did not work because the scripting code was operating on an old data set. Reparsing the configuration before evaluating which scripts to (un)load solves this problem. REVIEW: 110357 BUG: 319767 FIXED-IN: 4.10.4
This commit is contained in:
parent
e49290a016
commit
f04be6b149
1 changed files with 6 additions and 0 deletions
|
@ -607,6 +607,12 @@ void KWin::Scripting::start()
|
||||||
LoadScriptList KWin::Scripting::queryScriptsToLoad()
|
LoadScriptList KWin::Scripting::queryScriptsToLoad()
|
||||||
{
|
{
|
||||||
KSharedConfig::Ptr _config = KGlobal::config();
|
KSharedConfig::Ptr _config = KGlobal::config();
|
||||||
|
static bool s_started = false;
|
||||||
|
if (s_started) {
|
||||||
|
_config->reparseConfiguration();
|
||||||
|
} else {
|
||||||
|
s_started = true;
|
||||||
|
}
|
||||||
QMap<QString,QString> pluginStates = KConfigGroup(_config, "Plugins").entryMap();
|
QMap<QString,QString> pluginStates = KConfigGroup(_config, "Plugins").entryMap();
|
||||||
KService::List offers = KServiceTypeTrader::self()->query("KWin/Script");
|
KService::List offers = KServiceTypeTrader::self()->query("KWin/Script");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue