Use version-less qt DBus macros

They work with both Qt5 and Qt6
This commit is contained in:
Nicolas Fella 2021-05-31 01:00:35 +02:00
parent eb27d312a3
commit f910b0de97
13 changed files with 25 additions and 25 deletions

View file

@ -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")

View file

@ -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)

View file

@ -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

View file

@ -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)

View file

@ -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
)

View file

@ -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
)

View file

@ -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})

View file

@ -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})

View file

@ -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})

View file

@ -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/")

View file

@ -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)

View file

@ -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})

View file

@ -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