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
wilder-5.14
Bhushan Shah 11 years ago
parent 5dcd9bb7ee
commit 3e42d6ae98
  1. 5
      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);
}

Loading…
Cancel
Save