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.

Cherry-picked from 4.10 branch: dd5b4bdec8e24359d4715c078e2f442967a3f873

CCBUG: 319767
icc-effect-5.14.5
Martin Gräßlin 2013-05-08 10:45:45 +02:00
parent d8db0f88be
commit c4b3d11261
1 changed files with 6 additions and 0 deletions

View File

@ -630,6 +630,12 @@ void KWin::Scripting::start()
LoadScriptList KWin::Scripting::queryScriptsToLoad()
{
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();
KService::List offers = KServiceTypeTrader::self()->query("KWin/Script");