From f04be6b149473528f11704770d40653e23c90db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 8 May 2013 10:45:45 +0200 Subject: [PATCH] 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 --- scripting/scripting.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index 6c6e258656..13a77bc346 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -607,6 +607,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 pluginStates = KConfigGroup(_config, "Plugins").entryMap(); KService::List offers = KServiceTypeTrader::self()->query("KWin/Script");