diff --git a/src/kcmkwin/common/effectsmodel.cpp b/src/kcmkwin/common/effectsmodel.cpp index c93198c557..4952f3d905 100644 --- a/src/kcmkwin/common/effectsmodel.cpp +++ b/src/kcmkwin/common/effectsmodel.cpp @@ -625,7 +625,7 @@ static KCModule *findScriptedConfig(const QString &pluginId, QObject *parent) return nullptr; } - return factory->create(pluginId, parent); + return factory->create(parent, QVariantList{pluginId}); } void EffectsModel::requestConfigure(const QModelIndex &index, QWindow *transientParent) diff --git a/src/scripting/genericscriptedconfig.cpp b/src/scripting/genericscriptedconfig.cpp index 2fdc480d6e..0be341631b 100644 --- a/src/scripting/genericscriptedconfig.cpp +++ b/src/scripting/genericscriptedconfig.cpp @@ -29,10 +29,14 @@ QObject *GenericScriptedConfigFactory::create(const char *iface, QWidget *parent { Q_UNUSED(iface) Q_UNUSED(parent) - if (keyword.startsWith(QLatin1String("kwin4_effect_"))) { - return new ScriptedEffectConfig(keyword, parentWidget, args); + Q_UNUSED(keyword) + Q_ASSERT(!args.isEmpty()); + + const QString pluginId = args.first().toString(); + if (pluginId.startsWith(QLatin1String("kwin4_effect_"))) { + return new ScriptedEffectConfig(pluginId, parentWidget, args); } else { - return new ScriptingConfig(keyword, parentWidget, args); + return new ScriptingConfig(pluginId, parentWidget, args); } }