From 3e42d6ae989e036ccdb19186aa09e06abcf7c9cd Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Wed, 3 Jun 2015 21:53:17 +0530 Subject: [PATCH] Fix createActivity not respecting shell package defaults If containment plugin is provided in the shell package's defaults file then use it instead of defaulting to desktopcontainment BUG: 348617 FIXED-IN: 5.4 REVIEW: 123990 --- shell/scripting/scriptengine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp index 951c58ea2..09b71a554 100644 --- a/shell/scripting/scriptengine.cpp +++ b/shell/scripting/scriptengine.cpp @@ -209,9 +209,10 @@ QScriptValue ScriptEngine::createActivity(QScriptContext *context, QScriptEngine Activity *a = new Activity(id, env->m_corona); qDebug() << "Setting default Containment plugin:" << plugin; - //FIXME: this shouldn't be necessary, but on some systems seems this is needed + if (plugin.isEmpty() || plugin == "undefined") { - a->setDefaultPlugin("org.kde.desktopcontainment"); + KConfigGroup shellCfg = KConfigGroup(KSharedConfig::openConfig(env->m_corona->package().filePath("defaults")), "Desktop"); + a->setDefaultPlugin(shellCfg.readEntry("Containment", "org.kde.desktopcontainment")); } else { a->setDefaultPlugin(plugin); }