diff --git a/scripting/CMakeLists.txt b/scripting/CMakeLists.txt index 8630b022fb..ae2816b966 100644 --- a/scripting/CMakeLists.txt +++ b/scripting/CMakeLists.txt @@ -1,4 +1,8 @@ set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp) kde4_add_plugin( kcm_kwin4_genericscripted ${kcm_kwin4_genericscripted_SRCS} ) -target_link_libraries( kcm_kwin4_genericscripted ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTUITOOLS_LIBRARY} ) +target_link_libraries( kcm_kwin4_genericscripted + ${KDE4Support_LIBRARIES} # KStandardDirs + ${KDE4_KDEUI_LIBRARY} #KCModule + KF5::plasma + ${Qt5UiTools_LIBRARIES} ) install( TARGETS kcm_kwin4_genericscripted DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/scripting/genericscriptedconfig.cpp b/scripting/genericscriptedconfig.cpp index 45dfeef4ea..607b4e2155 100644 --- a/scripting/genericscriptedconfig.cpp +++ b/scripting/genericscriptedconfig.cpp @@ -20,6 +20,7 @@ #include "genericscriptedconfig.h" #include "config-kwin.h" +#include #include #include #include @@ -43,14 +44,14 @@ QObject *GenericScriptedConfigFactory::create(const char *iface, QWidget *parent Q_UNUSED(iface) Q_UNUSED(parent) if (keyword.startsWith(QStringLiteral("kwin4_effect_"))) { - return new ScriptedEffectConfig(componentData(), keyword, parentWidget, args); + return new ScriptedEffectConfig(componentName(), keyword, parentWidget, args); } else { - return new ScriptingConfig(componentData(), keyword, parentWidget, args); + return new ScriptingConfig(componentName(), keyword, parentWidget, args); } } -GenericScriptedConfig::GenericScriptedConfig(const KComponentData &data, const QString &keyword, QWidget *parent, const QVariantList &args) - : KCModule(data, parent, args) +GenericScriptedConfig::GenericScriptedConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args) + : KCModule(KAboutData::pluginData(componentName), parent, args) , m_packageName(keyword) { } @@ -104,8 +105,8 @@ void GenericScriptedConfig::reload() { } -ScriptedEffectConfig::ScriptedEffectConfig(const KComponentData &data, const QString &keyword, QWidget *parent, const QVariantList &args) - : GenericScriptedConfig(data, keyword, parent, args) +ScriptedEffectConfig::ScriptedEffectConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args) + : GenericScriptedConfig(componentName, keyword, parent, args) { createUi(); } @@ -134,8 +135,8 @@ void ScriptedEffectConfig::reload() QDBusConnection::sessionBus().send(message); } -ScriptingConfig::ScriptingConfig(const KComponentData &data, const QString &keyword, QWidget *parent, const QVariantList &args) - : GenericScriptedConfig(data, keyword, parent, args) +ScriptingConfig::ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args) + : GenericScriptedConfig(componentName, keyword, parent, args) { createUi(); } diff --git a/scripting/genericscriptedconfig.h b/scripting/genericscriptedconfig.h index 6d61bafce0..b73bf83711 100644 --- a/scripting/genericscriptedconfig.h +++ b/scripting/genericscriptedconfig.h @@ -42,7 +42,7 @@ class GenericScriptedConfig : public KCModule Q_OBJECT public: - GenericScriptedConfig(const KComponentData &data, const QString &keyword, QWidget *parent, const QVariantList &args); + GenericScriptedConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args); virtual ~GenericScriptedConfig(); public Q_SLOTS: @@ -63,7 +63,7 @@ class ScriptedEffectConfig : public GenericScriptedConfig { Q_OBJECT public: - ScriptedEffectConfig(const KComponentData &data, const QString &keyword, QWidget *parent, const QVariantList &args); + ScriptedEffectConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args); virtual ~ScriptedEffectConfig(); protected: virtual QString typeName() const; @@ -75,7 +75,7 @@ class ScriptingConfig : public GenericScriptedConfig { Q_OBJECT public: - ScriptingConfig(const KComponentData &data, const QString &keyword, QWidget *parent, const QVariantList &args); + ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args); virtual ~ScriptingConfig(); protected: