From a2aab537d60f44e6dd557bd314ecb8df5039cbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 18 Mar 2014 16:09:20 +0100 Subject: [PATCH] [kwin/effects] Use generated dbus interface to reconfigure effects Instead of using EffectsHandler::sendReloadMessage we generate the dbus interface in each plugin and call the reconfigure slot directly. That way it's more type safe and we don't need to link kwineffects from the configs. REVIEW: 116875 --- CMakeLists.txt | 2 +- effects/blur/CMakeLists.txt | 3 ++- effects/blur/blur_config.cpp | 8 ++++++-- effects/coverswitch/CMakeLists.txt | 3 ++- effects/coverswitch/coverswitch_config.cpp | 8 ++++++-- effects/cube/CMakeLists.txt | 3 ++- effects/cube/cube_config.cpp | 8 ++++++-- effects/cube/cubeslide_config.cpp | 9 ++++++--- effects/dashboard/CMakeLists.txt | 3 ++- effects/dashboard/dashboard_config.cpp | 8 ++++++-- effects/desktopgrid/CMakeLists.txt | 1 + effects/desktopgrid/desktopgrid_config.cpp | 8 ++++++-- effects/diminactive/CMakeLists.txt | 3 ++- effects/diminactive/diminactive_config.cpp | 8 ++++++-- effects/flipswitch/CMakeLists.txt | 2 +- effects/flipswitch/flipswitch_config.cpp | 8 ++++++-- effects/glide/CMakeLists.txt | 3 ++- effects/glide/glide_config.cpp | 8 ++++++-- effects/invert/CMakeLists.txt | 2 +- effects/invert/invert_config.cpp | 8 ++++++-- effects/lookingglass/CMakeLists.txt | 2 +- effects/lookingglass/lookingglass_config.cpp | 8 ++++++-- effects/magiclamp/CMakeLists.txt | 3 ++- effects/magiclamp/magiclamp_config.cpp | 8 ++++++-- effects/magnifier/CMakeLists.txt | 2 +- effects/magnifier/magnifier_config.cpp | 8 ++++++-- effects/mouseclick/CMakeLists.txt | 2 +- effects/mouseclick/mouseclick_config.cpp | 8 ++++++-- effects/mousemark/CMakeLists.txt | 2 +- effects/mousemark/mousemark_config.cpp | 8 ++++++-- effects/presentwindows/CMakeLists.txt | 2 +- effects/presentwindows/presentwindows_config.cpp | 8 ++++++-- effects/presentwindows/presentwindows_config.h | 1 - effects/resize/CMakeLists.txt | 3 ++- effects/resize/resize_config.cpp | 9 ++++++--- effects/showfps/CMakeLists.txt | 3 ++- effects/showfps/showfps_config.cpp | 11 ++++++----- effects/thumbnailaside/CMakeLists.txt | 2 +- effects/thumbnailaside/thumbnailaside_config.cpp | 8 ++++++-- effects/trackmouse/CMakeLists.txt | 2 +- effects/trackmouse/trackmouse_config.cpp | 8 ++++++-- effects/windowgeometry/CMakeLists.txt | 2 +- effects/windowgeometry/windowgeometry_config.cpp | 8 ++++++-- effects/wobblywindows/CMakeLists.txt | 3 ++- effects/wobblywindows/wobblywindows_config.cpp | 9 ++++++--- effects/wobblywindows/wobblywindows_config.h | 1 - effects/zoom/CMakeLists.txt | 2 +- effects/zoom/zoom_config.cpp | 8 ++++++-- libkwineffects/kwineffects.cpp | 12 +----------- libkwineffects/kwineffects.h | 6 ------ 50 files changed, 172 insertions(+), 93 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd81178c54..ab1676de9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,7 +358,7 @@ kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc) qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface ) qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml composite.h KWin::Compositor ) -qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Effects.xml effects.h KWin::EffectsHandlerImpl ) +qt5_add_dbus_adaptor( kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl ) qt5_add_dbus_interface( kwin_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.ScreenSaver.xml screenlocker_interface) diff --git a/effects/blur/CMakeLists.txt b/effects/blur/CMakeLists.txt index 71ddaf0689..5485757d61 100644 --- a/effects/blur/CMakeLists.txt +++ b/effects/blur/CMakeLists.txt @@ -10,12 +10,13 @@ install( FILES # Config set(kwin_blur_config_SRCS blur_config.cpp) qt5_wrap_ui(kwin_blur_config_SRCS blur_config.ui) +qt5_add_dbus_interface(kwin_blur_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_blur_config_SRCS blurconfig.kcfgc) add_library(kwin_blur_config MODULE ${kwin_blur_config_SRCS}) target_link_libraries(kwin_blur_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/blur/blur_config.cpp b/effects/blur/blur_config.cpp index 82d58d34c9..9bef02d775 100644 --- a/effects/blur/blur_config.cpp +++ b/effects/blur/blur_config.cpp @@ -21,8 +21,9 @@ // KConfigSkeleton #include "blurconfig.h" -#include +#include #include +#include K_PLUGIN_FACTORY_WITH_JSON(BlurEffectConfigFactory, "blur_config.json", @@ -48,7 +49,10 @@ void BlurEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("blur")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_blur")); } } // namespace KWin diff --git a/effects/coverswitch/CMakeLists.txt b/effects/coverswitch/CMakeLists.txt index 4192e2e45f..102fef0f74 100644 --- a/effects/coverswitch/CMakeLists.txt +++ b/effects/coverswitch/CMakeLists.txt @@ -16,12 +16,13 @@ install( FILES # Config set(kwin_coverswitch_config_SRCS coverswitch_config.cpp) qt5_wrap_ui(kwin_coverswitch_config_SRCS coverswitch_config.ui) +qt5_add_dbus_interface(kwin_coverswitch_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_coverswitch_config_SRCS coverswitchconfig.kcfgc) add_library(kwin_coverswitch_config MODULE ${kwin_coverswitch_config_SRCS}) target_link_libraries(kwin_coverswitch_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/coverswitch/coverswitch_config.cpp b/effects/coverswitch/coverswitch_config.cpp index 60732523e0..d1e87fba74 100644 --- a/effects/coverswitch/coverswitch_config.cpp +++ b/effects/coverswitch/coverswitch_config.cpp @@ -21,8 +21,9 @@ along with this program. If not, see . // KConfigSkeleton #include "coverswitchconfig.h" -#include +#include #include +#include #include @@ -53,7 +54,10 @@ CoverSwitchEffectConfig::CoverSwitchEffectConfig(QWidget* parent, const QVariant void CoverSwitchEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("coverswitch")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_coverswitch")); } } // namespace diff --git a/effects/cube/CMakeLists.txt b/effects/cube/CMakeLists.txt index f074e16733..b2eb1b898b 100644 --- a/effects/cube/CMakeLists.txt +++ b/effects/cube/CMakeLists.txt @@ -34,12 +34,12 @@ install( FILES # cube set(kwin_cube_config_SRCS cube_config.cpp) qt5_wrap_ui(kwin_cube_config_SRCS cube_config.ui) +qt5_add_dbus_interface(kwin_cube_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_cube_config_SRCS cubeconfig.kcfgc) add_library(kwin_cube_config MODULE ${kwin_cube_config_SRCS}) target_link_libraries(kwin_cube_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n @@ -53,6 +53,7 @@ kservice_desktop_to_json(kwin_cube_config cube_config.desktop) # cube slide set(kwin_cubeslide_config_SRCS cubeslide_config.cpp) qt5_wrap_ui(kwin_cubeslide_config_SRCS cubeslide_config.ui) +qt5_add_dbus_interface(kwin_cubeslide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_cubeslide_config_SRCS cubeslideconfig.kcfgc) add_library(kwin_cubeslide_config MODULE ${kwin_cubeslide_config_SRCS}) diff --git a/effects/cube/cube_config.cpp b/effects/cube/cube_config.cpp index 5e826ba496..2b6c2879b5 100644 --- a/effects/cube/cube_config.cpp +++ b/effects/cube/cube_config.cpp @@ -20,9 +20,9 @@ along with this program. If not, see . #include "cube_config.h" // KConfigSkeleton #include "cubeconfig.h" +#include #include -#include #include #include @@ -30,6 +30,7 @@ along with this program. If not, see . #include #include #include +#include #include #include @@ -90,7 +91,10 @@ void CubeEffectConfig::save() { KCModule::save(); m_ui->editor->save(); - EffectsHandler::sendReloadMessage(QStringLiteral("cube")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_cube")); } void CubeEffectConfig::capsSelectionChanged() diff --git a/effects/cube/cubeslide_config.cpp b/effects/cube/cubeslide_config.cpp index aba6cab5e5..15edc7be8f 100644 --- a/effects/cube/cubeslide_config.cpp +++ b/effects/cube/cubeslide_config.cpp @@ -20,11 +20,11 @@ along with this program. If not, see . #include "cubeslide_config.h" // KConfigSkeleton #include "cubeslideconfig.h" - -#include +#include #include #include +#include #include K_PLUGIN_FACTORY_WITH_JSON(CubeSlideEffectConfigFactory, @@ -56,7 +56,10 @@ CubeSlideEffectConfig::CubeSlideEffectConfig(QWidget* parent, const QVariantList void CubeSlideEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("cubeslide")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_cubeslide")); } } // namespace diff --git a/effects/dashboard/CMakeLists.txt b/effects/dashboard/CMakeLists.txt index fd5c15f407..ae5e34f77f 100644 --- a/effects/dashboard/CMakeLists.txt +++ b/effects/dashboard/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_dashboard_config_SRCS dashboard_config.cpp) qt5_wrap_ui(kwin_dashboard_config_SRCS dashboard_config.ui) +qt5_add_dbus_interface(kwin_dashboard_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_dashboard_config_SRCS dashboardconfig.kcfgc) add_library(kwin_dashboard_config MODULE ${kwin_dashboard_config_SRCS}) target_link_libraries(kwin_dashboard_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/dashboard/dashboard_config.cpp b/effects/dashboard/dashboard_config.cpp index d53e235515..476c9efc5d 100644 --- a/effects/dashboard/dashboard_config.cpp +++ b/effects/dashboard/dashboard_config.cpp @@ -21,8 +21,9 @@ // KConfigSkeleton #include "dashboardconfig.h" -#include +#include #include +#include K_PLUGIN_FACTORY_WITH_JSON(DashboardEffectConfigFactory, "dashboard_config.json", @@ -49,7 +50,10 @@ void DashboardEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("dashboard")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_dashboard")); } } // namespace KWin diff --git a/effects/desktopgrid/CMakeLists.txt b/effects/desktopgrid/CMakeLists.txt index c7a9f2c880..164a2b1930 100644 --- a/effects/desktopgrid/CMakeLists.txt +++ b/effects/desktopgrid/CMakeLists.txt @@ -12,6 +12,7 @@ install( FILES # Config set(kwin_desktopgrid_config_SRCS desktopgrid_config.cpp) qt5_wrap_ui(kwin_desktopgrid_config_SRCS desktopgrid_config.ui) +qt5_add_dbus_interface(kwin_desktopgrid_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_desktopgrid_config_SRCS desktopgridconfig.kcfgc) add_library(kwin_desktopgrid_config MODULE ${kwin_desktopgrid_config_SRCS}) diff --git a/effects/desktopgrid/desktopgrid_config.cpp b/effects/desktopgrid/desktopgrid_config.cpp index 59587a431b..12b3065892 100644 --- a/effects/desktopgrid/desktopgrid_config.cpp +++ b/effects/desktopgrid/desktopgrid_config.cpp @@ -22,15 +22,16 @@ along with this program. If not, see . #include "desktopgrid_config.h" // KConfigSkeleton #include "desktopgridconfig.h" +#include #include -#include #include #include #include #include #include +#include #include @@ -106,7 +107,10 @@ void DesktopGridEffectConfig::save() conf.writeEntry("DesktopNameAlignment", DesktopGridConfig::desktopNameAlignment()); conf.sync(); - EffectsHandler::sendReloadMessage(QStringLiteral("desktopgrid")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_desktopgrid")); } void DesktopGridEffectConfig::load() diff --git a/effects/diminactive/CMakeLists.txt b/effects/diminactive/CMakeLists.txt index 09e7d4d1a3..aba4866d3c 100644 --- a/effects/diminactive/CMakeLists.txt +++ b/effects/diminactive/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_diminactive_config_SRCS diminactive_config.cpp) qt5_wrap_ui(kwin_diminactive_config_SRCS diminactive_config.ui) +qt5_add_dbus_interface(kwin_diminactive_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_diminactive_config_SRCS diminactiveconfig.kcfgc) add_library(kwin_diminactive_config MODULE ${kwin_diminactive_config_SRCS}) target_link_libraries(kwin_diminactive_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/diminactive/diminactive_config.cpp b/effects/diminactive/diminactive_config.cpp index b2d80e31a0..cb9ecf0106 100644 --- a/effects/diminactive/diminactive_config.cpp +++ b/effects/diminactive/diminactive_config.cpp @@ -22,11 +22,12 @@ along with this program. If not, see . // KConfigSkeleton #include "diminactiveconfig.h" -#include +#include #include #include #include +#include #include #include @@ -60,7 +61,10 @@ DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget* parent, const QVariant void DimInactiveEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("diminactive")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_diminactive")); } } // namespace diff --git a/effects/flipswitch/CMakeLists.txt b/effects/flipswitch/CMakeLists.txt index 5ec12d1f07..0691db6ed9 100644 --- a/effects/flipswitch/CMakeLists.txt +++ b/effects/flipswitch/CMakeLists.txt @@ -8,12 +8,12 @@ install( FILES # Config set(kwin_flipswitch_config_SRCS flipswitch_config.cpp) qt5_wrap_ui(kwin_flipswitch_config_SRCS flipswitch_config.ui) +qt5_add_dbus_interface(kwin_flipswitch_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_flipswitch_config_SRCS flipswitchconfig.kcfgc) add_library(kwin_flipswitch_config MODULE ${kwin_flipswitch_config_SRCS}) target_link_libraries(kwin_flipswitch_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/flipswitch/flipswitch_config.cpp b/effects/flipswitch/flipswitch_config.cpp index 0b25c83de3..caf5f2f688 100644 --- a/effects/flipswitch/flipswitch_config.cpp +++ b/effects/flipswitch/flipswitch_config.cpp @@ -20,15 +20,16 @@ along with this program. If not, see . #include "flipswitch_config.h" // KConfigSkeleton #include "flipswitchconfig.h" +#include #include -#include #include #include #include #include #include +#include #include @@ -81,7 +82,10 @@ void FlipSwitchEffectConfig::save() KCModule::save(); m_ui->shortcutEditor->save(); - EffectsHandler::sendReloadMessage(QStringLiteral("flipswitch")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_flipswitch")); } diff --git a/effects/glide/CMakeLists.txt b/effects/glide/CMakeLists.txt index 9d96c0d879..32c146fdf4 100644 --- a/effects/glide/CMakeLists.txt +++ b/effects/glide/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_glide_config_SRCS glide_config.cpp) qt5_wrap_ui(kwin_glide_config_SRCS glide_config.ui) +qt5_add_dbus_interface(kwin_glide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_glide_config_SRCS glideconfig.kcfgc) add_library(kwin_glide_config MODULE ${kwin_glide_config_SRCS}) target_link_libraries(kwin_glide_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/glide/glide_config.cpp b/effects/glide/glide_config.cpp index 5b6324797f..6851955ce0 100644 --- a/effects/glide/glide_config.cpp +++ b/effects/glide/glide_config.cpp @@ -22,8 +22,9 @@ // KConfigSkeleton #include "glideconfig.h" -#include +#include #include +#include K_PLUGIN_FACTORY_WITH_JSON(GlideEffectConfigFactory, "glide_config.json", @@ -47,7 +48,10 @@ GlideEffectConfig::~GlideEffectConfig() void GlideEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("glide")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_glide")); } } // namespace KWin #include "glide_config.moc" diff --git a/effects/invert/CMakeLists.txt b/effects/invert/CMakeLists.txt index 90c53e5946..2ab7db79b7 100644 --- a/effects/invert/CMakeLists.txt +++ b/effects/invert/CMakeLists.txt @@ -17,11 +17,11 @@ install( FILES ####################################### # Config set(kwin_invert_config_SRCS invert_config.cpp) +qt5_add_dbus_interface(kwin_invert_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) add_library(kwin_invert_config MODULE ${kwin_invert_config_SRCS}) target_link_libraries(kwin_invert_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/invert/invert_config.cpp b/effects/invert/invert_config.cpp index d5deec1fa1..b4388cf4b4 100644 --- a/effects/invert/invert_config.cpp +++ b/effects/invert/invert_config.cpp @@ -19,15 +19,16 @@ along with this program. If not, see . *********************************************************************/ #include "invert_config.h" +#include #include -#include #include #include #include #include #include +#include #include @@ -86,7 +87,10 @@ void InvertEffectConfig::save() mShortcutEditor->save(); // undo() will restore to this state from now on emit changed(false); - EffectsHandler::sendReloadMessage(QStringLiteral("invert")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_invert")); } void InvertEffectConfig::defaults() diff --git a/effects/lookingglass/CMakeLists.txt b/effects/lookingglass/CMakeLists.txt index d6df79692f..1393af96f0 100644 --- a/effects/lookingglass/CMakeLists.txt +++ b/effects/lookingglass/CMakeLists.txt @@ -18,12 +18,12 @@ install( FILES # Config set(kwin_lookingglass_config_SRCS lookingglass_config.cpp) qt5_wrap_ui(kwin_lookingglass_config_SRCS lookingglass_config.ui) +qt5_add_dbus_interface(kwin_lookingglass_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_lookingglass_config_SRCS lookingglassconfig.kcfgc) add_library(kwin_lookingglass_config MODULE ${kwin_lookingglass_config_SRCS}) target_link_libraries(kwin_lookingglass_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/lookingglass/lookingglass_config.cpp b/effects/lookingglass/lookingglass_config.cpp index 1724898198..9589589d42 100644 --- a/effects/lookingglass/lookingglass_config.cpp +++ b/effects/lookingglass/lookingglass_config.cpp @@ -22,15 +22,16 @@ along with this program. If not, see . // KConfigSkeleton #include "lookingglassconfig.h" +#include #include -#include #include #include #include #include #include +#include #include #include @@ -98,7 +99,10 @@ void LookingGlassEffectConfig::save() m_ui->editor->save(); // undo() will restore to this state from now on - EffectsHandler::sendReloadMessage(QStringLiteral("lookingglass")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_lookingglass")); } void LookingGlassEffectConfig::defaults() diff --git a/effects/magiclamp/CMakeLists.txt b/effects/magiclamp/CMakeLists.txt index a395846a68..35f779198e 100644 --- a/effects/magiclamp/CMakeLists.txt +++ b/effects/magiclamp/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_magiclamp_config_SRCS magiclamp_config.cpp) qt5_wrap_ui(kwin_magiclamp_config_SRCS magiclamp_config.ui) +qt5_add_dbus_interface(kwin_magiclamp_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_magiclamp_config_SRCS magiclampconfig.kcfgc) add_library(kwin_magiclamp_config MODULE ${kwin_magiclamp_config_SRCS}) target_link_libraries(kwin_magiclamp_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/magiclamp/magiclamp_config.cpp b/effects/magiclamp/magiclamp_config.cpp index 0558f56342..6978332648 100644 --- a/effects/magiclamp/magiclamp_config.cpp +++ b/effects/magiclamp/magiclamp_config.cpp @@ -21,10 +21,11 @@ along with this program. If not, see . // KConfigSkeleton #include "magiclampconfig.h" -#include +#include #include #include +#include #include @@ -57,7 +58,10 @@ MagicLampEffectConfig::MagicLampEffectConfig(QWidget* parent, const QVariantList void MagicLampEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("magiclamp")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_magiclamp")); } } // namespace diff --git a/effects/magnifier/CMakeLists.txt b/effects/magnifier/CMakeLists.txt index 9fc90fc647..d929c2a8a9 100644 --- a/effects/magnifier/CMakeLists.txt +++ b/effects/magnifier/CMakeLists.txt @@ -8,12 +8,12 @@ install( FILES # Config set(kwin_magnifier_config_SRCS magnifier_config.cpp) qt5_wrap_ui(kwin_magnifier_config_SRCS magnifier_config.ui) +qt5_add_dbus_interface(kwin_magnifier_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_magnifier_config_SRCS magnifierconfig.kcfgc) add_library(kwin_magnifier_config MODULE ${kwin_magnifier_config_SRCS}) target_link_libraries(kwin_magnifier_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/magnifier/magnifier_config.cpp b/effects/magnifier/magnifier_config.cpp index f48f78a612..de0e33b57f 100644 --- a/effects/magnifier/magnifier_config.cpp +++ b/effects/magnifier/magnifier_config.cpp @@ -21,15 +21,16 @@ along with this program. If not, see . #include "magnifier_config.h" // KConfigSkeleton #include "magnifierconfig.h" +#include #include -#include #include #include #include #include #include +#include #include #include @@ -99,7 +100,10 @@ void MagnifierEffectConfig::save() m_ui->editor->save(); // undo() will restore to this state from now on KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("magnifier")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_magnifier")); } void MagnifierEffectConfig::defaults() diff --git a/effects/mouseclick/CMakeLists.txt b/effects/mouseclick/CMakeLists.txt index 6e1f18dab1..a300a81202 100644 --- a/effects/mouseclick/CMakeLists.txt +++ b/effects/mouseclick/CMakeLists.txt @@ -10,12 +10,12 @@ install( FILES ########################## set(kwin_mouseclick_config_SRCS mouseclick_config.cpp) qt5_wrap_ui(kwin_mouseclick_config_SRCS mouseclick_config.ui) +qt5_add_dbus_interface(kwin_mouseclick_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_mouseclick_config_SRCS mouseclickconfig.kcfgc) add_library(kwin_mouseclick_config MODULE ${kwin_mouseclick_config_SRCS}) target_link_libraries(kwin_mouseclick_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/mouseclick/mouseclick_config.cpp b/effects/mouseclick/mouseclick_config.cpp index 2f4e07e619..1d8a63b1d6 100644 --- a/effects/mouseclick/mouseclick_config.cpp +++ b/effects/mouseclick/mouseclick_config.cpp @@ -21,14 +21,15 @@ along with this program. If not, see . #include "mouseclick_config.h" // KConfigSkeleton #include "mouseclickconfig.h" +#include #include -#include #include #include #include #include +#include #include @@ -79,7 +80,10 @@ void MouseClickEffectConfig::save() { KCModule::save(); m_ui->editor->save(); // undo() will restore to this state from now on - EffectsHandler::sendReloadMessage(QStringLiteral("mouseclick")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_mouseclick")); } } // namespace diff --git a/effects/mousemark/CMakeLists.txt b/effects/mousemark/CMakeLists.txt index 78c2cd3450..f4e3dd46f3 100644 --- a/effects/mousemark/CMakeLists.txt +++ b/effects/mousemark/CMakeLists.txt @@ -8,12 +8,12 @@ install( FILES # Config set(kwin_mousemark_config_SRCS mousemark_config.cpp) qt5_wrap_ui(kwin_mousemark_config_SRCS mousemark_config.ui) +qt5_add_dbus_interface(kwin_mousemark_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_mousemark_config_SRCS mousemarkconfig.kcfgc) add_library(kwin_mousemark_config MODULE ${kwin_mousemark_config_SRCS}) target_link_libraries(kwin_mousemark_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/mousemark/mousemark_config.cpp b/effects/mousemark/mousemark_config.cpp index cedc655cac..75b6d20237 100644 --- a/effects/mousemark/mousemark_config.cpp +++ b/effects/mousemark/mousemark_config.cpp @@ -22,14 +22,15 @@ along with this program. If not, see . // KConfigSkeleton #include "mousemarkconfig.h" +#include #include -#include #include #include #include #include +#include #include #include @@ -93,7 +94,10 @@ void MouseMarkEffectConfig::save() m_actionCollection->writeSettings(); m_ui->editor->save(); // undo() will restore to this state from now on - EffectsHandler::sendReloadMessage(QStringLiteral("mousemark")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_mousemark")); } } // namespace diff --git a/effects/presentwindows/CMakeLists.txt b/effects/presentwindows/CMakeLists.txt index 8b6d7d0d40..06e138cdca 100644 --- a/effects/presentwindows/CMakeLists.txt +++ b/effects/presentwindows/CMakeLists.txt @@ -12,12 +12,12 @@ install( FILES # Config set(kwin_presentwindows_config_SRCS presentwindows_config.cpp) qt5_wrap_ui(kwin_presentwindows_config_SRCS presentwindows_config.ui) +qt5_add_dbus_interface(kwin_presentwindows_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_presentwindows_config_SRCS presentwindowsconfig.kcfgc) add_library(kwin_presentwindows_config MODULE ${kwin_presentwindows_config_SRCS}) target_link_libraries(kwin_presentwindows_config - kwineffects KF5::Completion KF5::ConfigWidgets KF5::GlobalAccel diff --git a/effects/presentwindows/presentwindows_config.cpp b/effects/presentwindows/presentwindows_config.cpp index 3828cf3655..5639b2fd88 100644 --- a/effects/presentwindows/presentwindows_config.cpp +++ b/effects/presentwindows/presentwindows_config.cpp @@ -22,14 +22,15 @@ along with this program. If not, see . #include "presentwindows_config.h" // KConfigSkeleton #include "presentwindowsconfig.h" +#include #include -#include #include #include #include #include #include +#include #include @@ -97,7 +98,10 @@ void PresentWindowsEffectConfig::save() { KCModule::save(); m_ui->shortcutEditor->save(); - EffectsHandler::sendReloadMessage(QStringLiteral("presentwindows")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("presentwindows")); } void PresentWindowsEffectConfig::defaults() diff --git a/effects/presentwindows/presentwindows_config.h b/effects/presentwindows/presentwindows_config.h index 5e5ca63049..6eae72b019 100644 --- a/effects/presentwindows/presentwindows_config.h +++ b/effects/presentwindows/presentwindows_config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #include #include "ui_presentwindows_config.h" -#include "presentwindows.h" namespace KWin { diff --git a/effects/resize/CMakeLists.txt b/effects/resize/CMakeLists.txt index d0ee9c4996..207dc1c173 100644 --- a/effects/resize/CMakeLists.txt +++ b/effects/resize/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_resize_config_SRCS resize_config.cpp) qt5_wrap_ui(kwin_resize_config_SRCS resize_config.ui) +qt5_add_dbus_interface(kwin_resize_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_resize_config_SRCS resizeconfig.kcfgc) add_library(kwin_resize_config MODULE ${kwin_resize_config_SRCS}) target_link_libraries(kwin_resize_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/resize/resize_config.cpp b/effects/resize/resize_config.cpp index 5a6a197e3a..0744059f52 100644 --- a/effects/resize/resize_config.cpp +++ b/effects/resize/resize_config.cpp @@ -20,11 +20,11 @@ along with this program. If not, see . #include "resize_config.h" // KConfigSkeleton #include "resizeconfig.h" - -#include +#include #include #include +#include #include @@ -57,7 +57,10 @@ ResizeEffectConfig::ResizeEffectConfig(QWidget* parent, const QVariantList& args void ResizeEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("resize")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_resize")); } } // namespace diff --git a/effects/showfps/CMakeLists.txt b/effects/showfps/CMakeLists.txt index b1e09272e5..3006565a07 100644 --- a/effects/showfps/CMakeLists.txt +++ b/effects/showfps/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_showfps_config_SRCS showfps_config.cpp) qt5_wrap_ui(kwin_showfps_config_SRCS showfps_config.ui) +qt5_add_dbus_interface(kwin_showfps_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_showfps_config_SRCS showfpsconfig.kcfgc) add_library(kwin_showfps_config MODULE ${kwin_showfps_config_SRCS}) target_link_libraries(kwin_showfps_config - kwineffects + Qt5::DBus KF5::Completion KF5::ConfigWidgets KF5::I18n diff --git a/effects/showfps/showfps_config.cpp b/effects/showfps/showfps_config.cpp index bd186b65f1..eb44442a1d 100644 --- a/effects/showfps/showfps_config.cpp +++ b/effects/showfps/showfps_config.cpp @@ -22,13 +22,11 @@ along with this program. If not, see . // KConfigSkeleton #include "showfpsconfig.h" - -#include "showfps.h" - -#include +#include #include #include +#include K_PLUGIN_FACTORY_WITH_JSON(ShowFpsEffectConfigFactory, "showfps_config.json", @@ -56,7 +54,10 @@ ShowFpsEffectConfig::~ShowFpsEffectConfig() void ShowFpsEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("showfps")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_showfps")); } } // namespace diff --git a/effects/thumbnailaside/CMakeLists.txt b/effects/thumbnailaside/CMakeLists.txt index 031a3276b8..063b964d57 100644 --- a/effects/thumbnailaside/CMakeLists.txt +++ b/effects/thumbnailaside/CMakeLists.txt @@ -8,12 +8,12 @@ install( FILES # Config set(kwin_thumbnailaside_config_SRCS thumbnailaside_config.cpp) qt5_wrap_ui(kwin_thumbnailaside_config_SRCS thumbnailaside_config.ui) +qt5_add_dbus_interface(kwin_thumbnailaside_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_thumbnailaside_config_SRCS thumbnailasideconfig.kcfgc) add_library(kwin_thumbnailaside_config MODULE ${kwin_thumbnailaside_config_SRCS}) target_link_libraries(kwin_thumbnailaside_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/thumbnailaside/thumbnailaside_config.cpp b/effects/thumbnailaside/thumbnailaside_config.cpp index 45b236c4c9..2bdc3f54b2 100644 --- a/effects/thumbnailaside/thumbnailaside_config.cpp +++ b/effects/thumbnailaside/thumbnailaside_config.cpp @@ -21,15 +21,16 @@ along with this program. If not, see . #include "thumbnailaside_config.h" // KConfigSkeleton #include "thumbnailasideconfig.h" +#include #include -#include #include #include #include #include #include +#include #include #include @@ -85,7 +86,10 @@ ThumbnailAsideEffectConfig::~ThumbnailAsideEffectConfig() void ThumbnailAsideEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("thumbnailaside")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_thumbnailaside")); } } // namespace diff --git a/effects/trackmouse/CMakeLists.txt b/effects/trackmouse/CMakeLists.txt index 99970d5a2e..40b45cd36a 100644 --- a/effects/trackmouse/CMakeLists.txt +++ b/effects/trackmouse/CMakeLists.txt @@ -16,12 +16,12 @@ install( FILES # Config set(kwin_trackmouse_config_SRCS trackmouse_config.cpp) qt5_wrap_ui(kwin_trackmouse_config_SRCS trackmouse_config.ui) +qt5_add_dbus_interface(kwin_trackmouse_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_trackmouse_config_SRCS trackmouseconfig.kcfgc) add_library(kwin_trackmouse_config MODULE ${kwin_trackmouse_config_SRCS}) target_link_libraries(kwin_trackmouse_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/trackmouse/trackmouse_config.cpp b/effects/trackmouse/trackmouse_config.cpp index b98188b2b7..73e559c982 100644 --- a/effects/trackmouse/trackmouse_config.cpp +++ b/effects/trackmouse/trackmouse_config.cpp @@ -20,12 +20,13 @@ along with this program. If not, see . *********************************************************************/ #include -#include +#include #include #include #include #include +#include #include #include @@ -98,7 +99,10 @@ void TrackMouseEffectConfig::save() { KCModule::save(); m_actionCollection->writeSettings(); - EffectsHandler::sendReloadMessage(QStringLiteral("trackmouse")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_trackmouse")); } void TrackMouseEffectConfig::defaults() diff --git a/effects/windowgeometry/CMakeLists.txt b/effects/windowgeometry/CMakeLists.txt index 5e238e523e..cea40ae6aa 100644 --- a/effects/windowgeometry/CMakeLists.txt +++ b/effects/windowgeometry/CMakeLists.txt @@ -8,12 +8,12 @@ install( FILES # Config set(kwin_windowgeometry_config_SRCS windowgeometry_config.cpp) qt5_wrap_ui(kwin_windowgeometry_config_SRCS windowgeometry_config.ui) +qt5_add_dbus_interface(kwin_windowgeometry_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_windowgeometry_config_SRCS windowgeometryconfig.kcfgc) add_library(kwin_windowgeometry_config MODULE ${kwin_windowgeometry_config_SRCS}) target_link_libraries(kwin_windowgeometry_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/windowgeometry/windowgeometry_config.cpp b/effects/windowgeometry/windowgeometry_config.cpp index 8a08b78e2b..18884e7edc 100644 --- a/effects/windowgeometry/windowgeometry_config.cpp +++ b/effects/windowgeometry/windowgeometry_config.cpp @@ -21,14 +21,15 @@ along with this program. If not, see . #include "windowgeometry_config.h" // KConfigSkeleton #include "windowgeometryconfig.h" +#include #include -#include #include #include #include #include #include +#include K_PLUGIN_FACTORY_WITH_JSON(WindowGeometryEffectConfigFactory, "windowgeometry_config.json", @@ -75,7 +76,10 @@ void WindowGeometryConfig::save() { KCModule::save(); myUi->shortcuts->save(); // undo() will restore to this state from now on - EffectsHandler::sendReloadMessage(QStringLiteral("windowgeometry")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_windowgeometry")); } void WindowGeometryConfig::defaults() diff --git a/effects/wobblywindows/CMakeLists.txt b/effects/wobblywindows/CMakeLists.txt index 09a2b1e5d5..bbc5b2675f 100644 --- a/effects/wobblywindows/CMakeLists.txt +++ b/effects/wobblywindows/CMakeLists.txt @@ -8,12 +8,13 @@ install( FILES # Config set(kwin_wobblywindows_config_SRCS wobblywindows_config.cpp) qt5_wrap_ui(kwin_wobblywindows_config_SRCS wobblywindows_config.ui) +qt5_add_dbus_interface(kwin_wobblywindows_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_wobblywindows_config_SRCS wobblywindowsconfig.kcfgc) add_library(kwin_wobblywindows_config MODULE ${kwin_wobblywindows_config_SRCS}) target_link_libraries(kwin_wobblywindows_config - kwineffects + Qt5::DBus KF5::ConfigWidgets KF5::I18n KF5::Service diff --git a/effects/wobblywindows/wobblywindows_config.cpp b/effects/wobblywindows/wobblywindows_config.cpp index 1f4a6e65c1..08ce204d55 100644 --- a/effects/wobblywindows/wobblywindows_config.cpp +++ b/effects/wobblywindows/wobblywindows_config.cpp @@ -22,12 +22,12 @@ along with this program. If not, see . #include "wobblywindows_config.h" // KConfigSkeleton #include "wobblywindowsconfig.h" - -#include +#include #include #include #include +#include K_PLUGIN_FACTORY_WITH_JSON(WobblyWindowsEffectConfigFactory, "wobblywindows_config.json", @@ -98,7 +98,10 @@ void WobblyWindowsEffectConfig::save() { KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("wobblywindows")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_wobblywindows")); } void WobblyWindowsEffectConfig::wobblinessChanged() diff --git a/effects/wobblywindows/wobblywindows_config.h b/effects/wobblywindows/wobblywindows_config.h index cb984c563a..196246a5a0 100644 --- a/effects/wobblywindows/wobblywindows_config.h +++ b/effects/wobblywindows/wobblywindows_config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #include #include "ui_wobblywindows_config.h" -#include "wobblywindows.h" namespace KWin diff --git a/effects/zoom/CMakeLists.txt b/effects/zoom/CMakeLists.txt index 6fd9222c03..1fa51c4ba7 100644 --- a/effects/zoom/CMakeLists.txt +++ b/effects/zoom/CMakeLists.txt @@ -8,12 +8,12 @@ install( FILES # Config set(kwin_zoom_config_SRCS zoom_config.cpp) qt5_wrap_ui(kwin_zoom_config_SRCS zoom_config.ui) +qt5_add_dbus_interface(kwin_zoom_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) kconfig_add_kcfg_files(kwin_zoom_config_SRCS zoomconfig.kcfgc) add_library(kwin_zoom_config MODULE ${kwin_zoom_config_SRCS}) target_link_libraries(kwin_zoom_config - kwineffects KF5::ConfigWidgets KF5::GlobalAccel KF5::I18n diff --git a/effects/zoom/zoom_config.cpp b/effects/zoom/zoom_config.cpp index 7a6ebb1d42..502f332cc5 100644 --- a/effects/zoom/zoom_config.cpp +++ b/effects/zoom/zoom_config.cpp @@ -22,14 +22,15 @@ along with this program. If not, see . #include "zoom_config.h" // KConfigSkeleton #include "zoomconfig.h" +#include #include -#include #include #include #include #include +#include #include @@ -135,7 +136,10 @@ void ZoomEffectConfig::save() { m_ui->editor->save(); // undo() will restore to this state from now on KCModule::save(); - EffectsHandler::sendReloadMessage(QStringLiteral("zoom")); + OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"), + QStringLiteral("/Effects"), + QDBusConnection::sessionBus()); + interface.reconfigureEffect(QStringLiteral("kwin4_effect_zoom")); } } // namespace diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index 0c33146603..433c24ce53 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "kwinxrenderutils.h" #include "config-kwin.h" -#include +#include #include #include #include @@ -629,16 +629,6 @@ bool EffectsHandler::isOpenGLCompositing() const return compositing_type & OpenGLCompositing; } -void EffectsHandler::sendReloadMessage(const QString& effectname) -{ - QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kwin"), - QStringLiteral("/KWin"), - QStringLiteral("org.kde.KWin"), - QStringLiteral("reconfigureEffect")); - message << QString(QStringLiteral("kwin4_effect_") + effectname); - QDBusConnection::sessionBus().send(message); -} - KConfigGroup EffectsHandler::effectConfig(const QString& effectname) { KSharedConfig::Ptr kwinconfig = KSharedConfig::openConfig(QStringLiteral(KWIN_CONFIG), KConfig::NoGlobals); diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index 3bd934f9b2..7daeac6971 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -1023,12 +1023,6 @@ public: */ virtual void doneOpenGLContextCurrent() = 0; - /** - * Sends message over DCOP to reload given effect. - * @param effectname effect's name without "kwin4_effect_" prefix. - * Can be called from effect's config module to apply config changes. - **/ - static void sendReloadMessage(const QString& effectname); /** * @return @ref KConfigGroup which holds given effect's config options **/