diff --git a/CMakeLists.txt b/CMakeLists.txt index a3638c340f..c1236cb9e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,7 @@ configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h ) ########### global ############### +set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml) include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/libkdecorations diff --git a/scripting/CMakeLists.txt b/scripting/CMakeLists.txt index 9ff53c35c3..2160a4f0cf 100644 --- a/scripting/CMakeLists.txt +++ b/scripting/CMakeLists.txt @@ -1,4 +1,5 @@ set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp) +qt5_add_dbus_interface(kcm_kwin4_genericscripted_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) add_library(kcm_kwin4_genericscripted MODULE ${kcm_kwin4_genericscripted_SRCS}) target_link_libraries( kcm_kwin4_genericscripted KF5::ConfigWidgets #KCModule diff --git a/scripting/genericscriptedconfig.cpp b/scripting/genericscriptedconfig.cpp index 19ee333d95..7a0a389c84 100644 --- a/scripting/genericscriptedconfig.cpp +++ b/scripting/genericscriptedconfig.cpp @@ -20,12 +20,11 @@ #include "genericscriptedconfig.h" #include "config-kwin.h" +#include #include #include #include -#include -#include #include #include #include @@ -127,12 +126,10 @@ KConfigGroup ScriptedEffectConfig::configGroup() void ScriptedEffectConfig::reload() { - QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kwin"), - QStringLiteral("/KWin"), - QStringLiteral("org.kde.KWin"), - QStringLiteral("reconfigureEffect")); - message << QString(packageName()); - QDBusConnection::sessionBus().send(message); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(packageName()); } ScriptingConfig::ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args)