From f910b0de9702cea290458a878a257fa8660480ab Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 31 May 2021 01:00:35 +0200 Subject: [PATCH] Use version-less qt DBus macros They work with both Qt5 and Qt6 --- autotests/CMakeLists.txt | 2 +- autotests/integration/CMakeLists.txt | 2 +- src/CMakeLists.txt | 22 +++++++++---------- src/effects/screenshot/CMakeLists.txt | 2 +- src/kcmkwin/common/CMakeLists.txt | 2 +- src/kcmkwin/kwincompositing/CMakeLists.txt | 2 +- src/kcmkwin/kwinoptions/CMakeLists.txt | 2 +- src/kcmkwin/kwinscreenedges/CMakeLists.txt | 2 +- src/kcmkwin/kwintabbox/CMakeLists.txt | 2 +- src/plugins/colord-integration/CMakeLists.txt | 6 ++--- .../krunner-integration/CMakeLists.txt | 2 +- src/plugins/nightcolor/CMakeLists.txt | 2 +- src/scripting/CMakeLists.txt | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index f6d7410d2b..6b4a842059 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -256,7 +256,7 @@ set(testScreenEdges_SRCS test_screen_edges.cpp ) kconfig_add_kcfg_files(testScreenEdges_SRCS ../src/settings.kcfgc) -qt5_add_dbus_interface(testScreenEdges_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface ) +qt_add_dbus_interface(testScreenEdges_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface ) add_executable(testScreenEdges ${testScreenEdges_SRCS}) set_target_properties(testScreenEdges PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW") diff --git a/autotests/integration/CMakeLists.txt b/autotests/integration/CMakeLists.txt index 6bdf2d0640..b6403161a1 100644 --- a/autotests/integration/CMakeLists.txt +++ b/autotests/integration/CMakeLists.txt @@ -108,7 +108,7 @@ integrationTest(WAYLAND_ONLY NAME testInputMethod SRCS inputmethod_test.cpp) integrationTest(WAYLAND_ONLY NAME testScreens SRCS screens_test.cpp) integrationTest(WAYLAND_ONLY NAME testOutputManagement SRCS outputmanagement_test.cpp) -qt5_add_dbus_interfaces(DBUS_SRCS ${CMAKE_BINARY_DIR}/src/org.kde.kwin.VirtualKeyboard.xml) +qt_add_dbus_interfaces(DBUS_SRCS ${CMAKE_BINARY_DIR}/src/org.kde.kwin.VirtualKeyboard.xml) integrationTest(WAYLAND_ONLY NAME testVirtualKeyboardDBus SRCS test_virtualkeyboard_dbus.cpp ${DBUS_SRCS}) if (KWIN_BUILD_CMS) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d84de67625..09f9bac502 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,7 @@ configure_file(libkwineffects/kwinconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/lib configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h) set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml) -qt5_add_dbus_interface(effects_interface_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) +qt_add_dbus_interface(effects_interface_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) add_library(KWinEffectsInterface STATIC ${effects_interface_SRCS}) target_link_libraries(KWinEffectsInterface Qt::DBus) @@ -152,22 +152,22 @@ set(kwin_SRCS xwl/xwayland_interface.cpp ) -qt5_add_dbus_adaptor(kwin_SRCS scripting/org.kde.kwin.Script.xml scripting/scripting.h KWin::AbstractScript) +qt_add_dbus_adaptor(kwin_SRCS scripting/org.kde.kwin.Script.xml scripting/scripting.h KWin::AbstractScript) kconfig_add_kcfg_files(kwin_SRCS settings.kcfgc) kconfig_add_kcfg_files(kwin_SRCS rulesettings.kcfgc) kconfig_add_kcfg_files(kwin_SRCS rulebooksettingsbase.kcfgc) -qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface) -qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface) -qt5_add_dbus_adaptor(kwin_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl) -qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface) -qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager) -qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Plugins.xml dbusinterface.h KWin::PluginManagerDBusInterface) +qt_add_dbus_adaptor(kwin_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface) +qt_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface) +qt_add_dbus_adaptor(kwin_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl) +qt_add_dbus_adaptor(kwin_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface) +qt_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager) +qt_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Plugins.xml dbusinterface.h KWin::PluginManagerDBusInterface) -qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface) -qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface) -qt5_add_dbus_interface(kwin_SRCS org.kde.kappmenu.xml appmenu_interface) +qt_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface) +qt_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface) +qt_add_dbus_interface(kwin_SRCS org.kde.kappmenu.xml appmenu_interface) ki18n_wrap_ui(kwin_SRCS debug_console.ui diff --git a/src/effects/screenshot/CMakeLists.txt b/src/effects/screenshot/CMakeLists.txt index bbea5f7b9f..ca7a00ae7d 100644 --- a/src/effects/screenshot/CMakeLists.txt +++ b/src/effects/screenshot/CMakeLists.txt @@ -9,4 +9,4 @@ set(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} screenshot/screenshotdbusinterface2.cpp ) -qt5_add_dbus_adaptor(kwin4_effect_builtins_sources screenshot/org.kde.KWin.ScreenShot2.xml screenshot/screenshotdbusinterface2.h KWin::ScreenShotDBusInterface2) +qt_add_dbus_adaptor(kwin4_effect_builtins_sources screenshot/org.kde.KWin.ScreenShot2.xml screenshot/screenshotdbusinterface2.h KWin::ScreenShotDBusInterface2) diff --git a/src/kcmkwin/common/CMakeLists.txt b/src/kcmkwin/common/CMakeLists.txt index a76e41ac36..38db4f66cb 100644 --- a/src/kcmkwin/common/CMakeLists.txt +++ b/src/kcmkwin/common/CMakeLists.txt @@ -7,7 +7,7 @@ set(kcmkwincommon_SRC effectsmodel.cpp ) -qt5_add_dbus_interface(kcmkwincommon_SRC +qt_add_dbus_interface(kcmkwincommon_SRC ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface ) diff --git a/src/kcmkwin/kwincompositing/CMakeLists.txt b/src/kcmkwin/kwincompositing/CMakeLists.txt index 6fc84e1bbf..33226d080d 100644 --- a/src/kcmkwin/kwincompositing/CMakeLists.txt +++ b/src/kcmkwin/kwincompositing/CMakeLists.txt @@ -11,7 +11,7 @@ set(kwincompositing_SRC kconfig_add_kcfg_files(kwincompositing_SRC kwincompositing_setting.kcfgc GENERATE_MOC) -qt5_add_dbus_interface(kwincompositing_SRC +qt_add_dbus_interface(kwincompositing_SRC ${KWin_SOURCE_DIR}/src/org.kde.kwin.Compositing.xml kwin_compositing_interface ) diff --git a/src/kcmkwin/kwinoptions/CMakeLists.txt b/src/kcmkwin/kwinoptions/CMakeLists.txt index a0b7ee4e4f..efcd56de9a 100644 --- a/src/kcmkwin/kwinoptions/CMakeLists.txt +++ b/src/kcmkwin/kwinoptions/CMakeLists.txt @@ -28,7 +28,7 @@ kcmutils_generate_module_data( kconfig_add_kcfg_files(kcm_kwinoptions_PART_SRCS kwinoptions_settings.kcfgc GENERATE_MOC) kconfig_add_kcfg_files(kcm_kwinoptions_PART_SRCS kwinoptions_kdeglobals_settings.kcfgc GENERATE_MOC) -qt5_add_dbus_interface(kcm_kwinoptions_PART_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface) +qt_add_dbus_interface(kcm_kwinoptions_PART_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface) add_library(kcm_kwinoptions MODULE ${kcm_kwinoptions_PART_SRCS}) target_link_libraries(kcm_kwinoptions kwin Qt::DBus KF5::KCMUtils KF5::Completion KF5::I18n KF5::ConfigWidgets KF5::Service KF5::WindowSystem) install(TARGETS kcm_kwinoptions DESTINATION ${KDE_INSTALL_PLUGINDIR}) diff --git a/src/kcmkwin/kwinscreenedges/CMakeLists.txt b/src/kcmkwin/kwinscreenedges/CMakeLists.txt index d7d283ab39..cc028b4696 100644 --- a/src/kcmkwin/kwinscreenedges/CMakeLists.txt +++ b/src/kcmkwin/kwinscreenedges/CMakeLists.txt @@ -9,7 +9,7 @@ set(kcm_screenedges_SRCS kwinscreenedgeconfigform.cpp ) -qt5_add_dbus_interface(kcm_screenedges_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface) +qt_add_dbus_interface(kcm_screenedges_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface) set(kcm_kwinscreenedges_PART_SRCS main.cpp ${kcm_screenedges_SRCS}) diff --git a/src/kcmkwin/kwintabbox/CMakeLists.txt b/src/kcmkwin/kwintabbox/CMakeLists.txt index 8297f5a86e..e4c48a9ab3 100644 --- a/src/kcmkwin/kwintabbox/CMakeLists.txt +++ b/src/kcmkwin/kwintabbox/CMakeLists.txt @@ -15,7 +15,7 @@ set(kcm_kwintabbox_PART_SRCS ) ki18n_wrap_ui(kcm_kwintabbox_PART_SRCS main.ui) -qt5_add_dbus_interface(kcm_kwintabbox_PART_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface) +qt_add_dbus_interface(kcm_kwintabbox_PART_SRCS ${KWin_SOURCE_DIR}/src/org.kde.kwin.Effects.xml kwin_effects_interface) kconfig_add_kcfg_files(kcm_kwintabbox_PART_SRCS kwintabboxsettings.kcfgc kwinswitcheffectsettings.kcfgc kwinpluginssettings.kcfgc) add_library(kcm_kwintabbox MODULE ${kcm_kwintabbox_PART_SRCS}) diff --git a/src/plugins/colord-integration/CMakeLists.txt b/src/plugins/colord-integration/CMakeLists.txt index 5b979cf87b..5d0e37a609 100644 --- a/src/plugins/colord-integration/CMakeLists.txt +++ b/src/plugins/colord-integration/CMakeLists.txt @@ -19,17 +19,17 @@ set(COLORD_MANAGER_XML org.freedesktop.ColorManager.xml) set_source_files_properties(${COLORD_MANAGER_XML} PROPERTIES INCLUDE "colordtypes.h") set_source_files_properties(${COLORD_MANAGER_XML} PROPERTIES NO_NAMESPACE true) set_source_files_properties(${COLORD_MANAGER_XML} PROPERTIES CLASSNAME CdInterface) -qt5_add_dbus_interface(colordintegration_SOURCES ${COLORD_MANAGER_XML} colordinterface) +qt_add_dbus_interface(colordintegration_SOURCES ${COLORD_MANAGER_XML} colordinterface) set_source_files_properties(${COLORD_DEVICE_XML} PROPERTIES INCLUDE "colordtypes.h") set_source_files_properties(${COLORD_DEVICE_XML} PROPERTIES NO_NAMESPACE true) set_source_files_properties(${COLORD_DEVICE_XML} PROPERTIES CLASSNAME CdDeviceInterface) -qt5_add_dbus_interface(colordintegration_SOURCES ${COLORD_DEVICE_XML} colorddeviceinterface) +qt_add_dbus_interface(colordintegration_SOURCES ${COLORD_DEVICE_XML} colorddeviceinterface) set_source_files_properties(${COLORD_PROFILE_XML} PROPERTIES INCLUDE "colordtypes.h") set_source_files_properties(${COLORD_PROFILE_XML} PROPERTIES NO_NAMESPACE true) set_source_files_properties(${COLORD_PROFILE_XML} PROPERTIES CLASSNAME CdProfileInterface) -qt5_add_dbus_interface(colordintegration_SOURCES ${COLORD_PROFILE_XML} colordprofileinterface) +qt_add_dbus_interface(colordintegration_SOURCES ${COLORD_PROFILE_XML} colordprofileinterface) add_library(colordintegration MODULE ${colordintegration_SOURCES}) set_target_properties(colordintegration PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kwin/plugins/") diff --git a/src/plugins/krunner-integration/CMakeLists.txt b/src/plugins/krunner-integration/CMakeLists.txt index b4ce71d7a8..d2dcee05c5 100644 --- a/src/plugins/krunner-integration/CMakeLists.txt +++ b/src/plugins/krunner-integration/CMakeLists.txt @@ -3,7 +3,7 @@ set(krunnerintegration_SOURCES windowsrunnerinterface.cpp ) -qt5_add_dbus_adaptor(krunnerintegration_SOURCES org.kde.krunner1.xml windowsrunnerinterface.h KWin::WindowsRunner) +qt_add_dbus_adaptor(krunnerintegration_SOURCES org.kde.krunner1.xml windowsrunnerinterface.h KWin::WindowsRunner) add_library(krunnerintegration MODULE ${krunnerintegration_SOURCES}) target_link_libraries(krunnerintegration kwin KF5::Runner) diff --git a/src/plugins/nightcolor/CMakeLists.txt b/src/plugins/nightcolor/CMakeLists.txt index 1e3fee47a9..aace8924db 100644 --- a/src/plugins/nightcolor/CMakeLists.txt +++ b/src/plugins/nightcolor/CMakeLists.txt @@ -15,7 +15,7 @@ ecm_qt_declare_logging_category(nightcolor_SOURCES ) kconfig_add_kcfg_files(nightcolor_SOURCES nightcolorsettings.kcfgc) -qt5_add_dbus_adaptor(nightcolor_SOURCES org.kde.kwin.ColorCorrect.xml +qt_add_dbus_adaptor(nightcolor_SOURCES org.kde.kwin.ColorCorrect.xml nightcolordbusinterface.h KWin::NightColorDBusInterface) add_library(KWinNightColorPlugin SHARED ${nightcolor_SOURCES}) diff --git a/src/scripting/CMakeLists.txt b/src/scripting/CMakeLists.txt index 7b8cd6e662..1879e6f695 100644 --- a/src/scripting/CMakeLists.txt +++ b/src/scripting/CMakeLists.txt @@ -1,5 +1,5 @@ set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp) -qt5_add_dbus_interface(kcm_kwin4_genericscripted_SRCS ${kwin_effects_dbus_xml} kwineffects_interface) +qt_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