diff --git a/src/scripting/genericscriptedconfig.cpp b/src/scripting/genericscriptedconfig.cpp index c8ffc0cb46..9474c21cb6 100644 --- a/src/scripting/genericscriptedconfig.cpp +++ b/src/scripting/genericscriptedconfig.cpp @@ -30,18 +30,17 @@ QObject *GenericScriptedConfigFactory::create(const char *iface, QWidget *parent Q_UNUSED(iface) Q_UNUSED(parent) if (keyword.startsWith(QLatin1String("kwin4_effect_"))) { - return new ScriptedEffectConfig(QStringLiteral("kcm_kwin4_genericscripted"), keyword, parentWidget, args); + return new ScriptedEffectConfig(keyword, parentWidget, args); } else { - return new ScriptingConfig(QStringLiteral("kcm_kwin4_genericscripted"), keyword, parentWidget, args); + return new ScriptingConfig(keyword, parentWidget, args); } } -GenericScriptedConfig::GenericScriptedConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args) +GenericScriptedConfig::GenericScriptedConfig(const QString &keyword, QWidget *parent, const QVariantList &args) : KCModule(parent, args) , m_packageName(keyword) , m_translator(new KLocalizedTranslator(this)) { - Q_UNUSED(componentName); QCoreApplication::instance()->installTranslator(m_translator); } @@ -109,8 +108,8 @@ void GenericScriptedConfig::reload() { } -ScriptedEffectConfig::ScriptedEffectConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args) - : GenericScriptedConfig(componentName, keyword, parent, args) +ScriptedEffectConfig::ScriptedEffectConfig(const QString &keyword, QWidget *parent, const QVariantList &args) + : GenericScriptedConfig(keyword, parent, args) { createUi(); } @@ -137,8 +136,8 @@ void ScriptedEffectConfig::reload() interface.reconfigureEffect(packageName()); } -ScriptingConfig::ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args) - : GenericScriptedConfig(componentName, keyword, parent, args) +ScriptingConfig::ScriptingConfig(const QString &keyword, QWidget *parent, const QVariantList &args) + : GenericScriptedConfig(keyword, parent, args) { createUi(); } diff --git a/src/scripting/genericscriptedconfig.h b/src/scripting/genericscriptedconfig.h index 2789acce11..30038adeb0 100644 --- a/src/scripting/genericscriptedconfig.h +++ b/src/scripting/genericscriptedconfig.h @@ -34,7 +34,7 @@ class GenericScriptedConfig : public KCModule Q_OBJECT public: - GenericScriptedConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args); + GenericScriptedConfig(const QString &keyword, QWidget *parent, const QVariantList &args); ~GenericScriptedConfig() override; public Q_SLOTS: @@ -56,7 +56,7 @@ class ScriptedEffectConfig : public GenericScriptedConfig { Q_OBJECT public: - ScriptedEffectConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args); + ScriptedEffectConfig(const QString &keyword, QWidget *parent, const QVariantList &args); ~ScriptedEffectConfig() override; protected: QString typeName() const override; @@ -68,7 +68,7 @@ class ScriptingConfig : public GenericScriptedConfig { Q_OBJECT public: - ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args); + ScriptingConfig(const QString &keyword, QWidget *parent, const QVariantList &args); ~ScriptingConfig() override; protected: