Commit dbac4bce authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Reduce the amount of objects that are compiled several times

Summary:
We build some objects several times which makes it uncomfortable to develop KWin
since every time we modify something a lot of things get rebuilt. This should
help a bit although it doesn't solve all the problems.

Test Plan: Builds, tests pass

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, anthonyfieroni, iasensio, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28445
parent 51a1e06d
......@@ -372,6 +372,9 @@ 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)
qt5_add_dbus_interface(effects_interface_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
add_library(KWinEffectsInterface OBJECT ${effects_interface_SRCS})
target_link_libraries(KWinEffectsInterface Qt5::DBus)
include_directories(BEFORE
${CMAKE_CURRENT_BINARY_DIR}/libkwineffects
......
add_subdirectory(helper)
add_library(KWinIntegrationTestFramework STATIC kwin_wayland_test.cpp test_helpers.cpp ${kwin_XWAYLAND_SRCS})
add_library(KWinIntegrationTestFramework STATIC kwin_wayland_test.cpp test_helpers.cpp generic_scene_opengl_test.cpp ${kwin_XWAYLAND_SRCS})
target_link_libraries(KWinIntegrationTestFramework kwin Qt5::Test)
function(integrationTest)
......@@ -36,9 +36,9 @@ integrationTest(WAYLAND_ONLY NAME testMaximized SRCS maximize_test.cpp)
integrationTest(WAYLAND_ONLY NAME testXdgShellClient SRCS xdgshellclient_test.cpp)
integrationTest(WAYLAND_ONLY NAME testDontCrashNoBorder SRCS dont_crash_no_border.cpp)
integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp)
integrationTest(WAYLAND_ONLY NAME testSceneOpenGL SRCS scene_opengl_test.cpp generic_scene_opengl_test.cpp)
integrationTest(WAYLAND_ONLY NAME testSceneOpenGL SRCS scene_opengl_test.cpp )
integrationTest(WAYLAND_ONLY NAME testSceneOpenGLShadow SRCS scene_opengl_shadow_test.cpp)
integrationTest(WAYLAND_ONLY NAME testSceneOpenGLES SRCS scene_opengl_es_test.cpp generic_scene_opengl_test.cpp)
integrationTest(WAYLAND_ONLY NAME testSceneOpenGLES SRCS scene_opengl_es_test.cpp )
integrationTest(WAYLAND_ONLY NAME testNoXdgRuntimeDir SRCS no_xdg_runtime_dir_test.cpp)
integrationTest(WAYLAND_ONLY NAME testScreenChanges SRCS screen_changes_test.cpp)
integrationTest(NAME testModiferOnlyShortcut SRCS modifier_only_shortcut_test.cpp)
......@@ -57,7 +57,7 @@ integrationTest(WAYLAND_ONLY NAME testColorCorrectNightColor SRCS colorcorrect_n
integrationTest(WAYLAND_ONLY NAME testDontCrashCursorPhysicalSizeEmpty SRCS dont_crash_cursor_physical_size_empty.cpp)
integrationTest(WAYLAND_ONLY NAME testDontCrashReinitializeCompositor SRCS dont_crash_reinitialize_compositor.cpp)
integrationTest(WAYLAND_ONLY NAME testNoGlobalShortcuts SRCS no_global_shortcuts_test.cpp)
integrationTest(WAYLAND_ONLY NAME testBufferSizeChange SRCS buffer_size_change_test.cpp generic_scene_opengl_test.cpp)
integrationTest(WAYLAND_ONLY NAME testBufferSizeChange SRCS buffer_size_change_test.cpp )
integrationTest(WAYLAND_ONLY NAME testPlacement SRCS placement_test.cpp)
integrationTest(WAYLAND_ONLY NAME testActivation SRCS activation_test.cpp)
......
include_directories(${Libinput_INCLUDE_DIRS})
include_directories(${UDEV_INCLUDE_DIR})
add_library(LibInputTestObjects OBJECT ../../libinput/device.cpp ../../libinput/events.cpp mock_libinput.cpp)
target_link_libraries(LibInputTestObjects Qt5::Test Qt5::Widgets Qt5::DBus Qt5::Gui KF5::ConfigCore)
########################################################
# Test Devices
########################################################
set(testLibinputDevice_SRCS device_test.cpp mock_libinput.cpp ../../libinput/device.cpp )
add_executable(testLibinputDevice ${testLibinputDevice_SRCS})
target_link_libraries(testLibinputDevice Qt5::Test Qt5::DBus Qt5::Gui KF5::ConfigCore)
add_executable(testLibinputDevice device_test.cpp)
target_link_libraries(testLibinputDevice Qt5::Test Qt5::DBus Qt5::Gui KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testLibinputDevice COMMAND testLibinputDevice)
ecm_mark_as_test(testLibinputDevice)
########################################################
# Test Key Event
########################################################
set(testLibinputKeyEvent_SRCS
../../libinput/device.cpp
../../libinput/events.cpp
key_event_test.cpp
mock_libinput.cpp
)
add_executable(testLibinputKeyEvent ${testLibinputKeyEvent_SRCS})
target_link_libraries(testLibinputKeyEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
add_executable(testLibinputKeyEvent key_event_test.cpp)
target_link_libraries(testLibinputKeyEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testLibinputKeyEvent COMMAND testLibinputKeyEvent)
ecm_mark_as_test(testLibinputKeyEvent)
########################################################
# Test Pointer Event
########################################################
set(testLibinputPointerEvent_SRCS
../../libinput/device.cpp
../../libinput/events.cpp
mock_libinput.cpp
pointer_event_test.cpp
)
add_executable(testLibinputPointerEvent ${testLibinputPointerEvent_SRCS})
target_link_libraries(testLibinputPointerEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
add_executable(testLibinputPointerEvent pointer_event_test.cpp)
target_link_libraries(testLibinputPointerEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testLibinputPointerEvent COMMAND testLibinputPointerEvent)
ecm_mark_as_test(testLibinputPointerEvent)
########################################################
# Test Touch Event
########################################################
set(testLibinputTouchEvent_SRCS
../../libinput/device.cpp
../../libinput/events.cpp
mock_libinput.cpp
touch_event_test.cpp
)
add_executable(testLibinputTouchEvent ${testLibinputTouchEvent_SRCS})
target_link_libraries(testLibinputTouchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
add_executable(testLibinputTouchEvent touch_event_test.cpp)
target_link_libraries(testLibinputTouchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testLibinputTouchEvent COMMAND testLibinputTouchEvent)
ecm_mark_as_test(testLibinputTouchEvent)
########################################################
# Test Gesture Event
########################################################
set(testLibinputGestureEvent_SRCS
../../libinput/device.cpp
../../libinput/events.cpp
gesture_event_test.cpp
mock_libinput.cpp
)
add_executable(testLibinputGestureEvent ${testLibinputGestureEvent_SRCS})
target_link_libraries(testLibinputGestureEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
add_executable(testLibinputGestureEvent gesture_event_test.cpp)
target_link_libraries(testLibinputGestureEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testLibinputGestureEvent COMMAND testLibinputGestureEvent)
ecm_mark_as_test(testLibinputGestureEvent)
########################################################
# Test Switch Event
########################################################
set(testLibinputSwitchEvent_SRCS
../../libinput/device.cpp
../../libinput/events.cpp
mock_libinput.cpp
switch_event_test.cpp
)
add_executable(testLibinputSwitchEvent ${testLibinputSwitchEvent_SRCS})
target_link_libraries(testLibinputSwitchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore)
add_executable(testLibinputSwitchEvent switch_event_test.cpp)
target_link_libraries(testLibinputSwitchEvent Qt5::Test Qt5::DBus Qt5::Widgets KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testLibinputSwitchEvent COMMAND testLibinputSwitchEvent)
ecm_mark_as_test(testLibinputSwitchEvent)
......@@ -84,16 +57,15 @@ ecm_mark_as_test(testLibinputSwitchEvent)
########################################################
set(testLibinputContext_SRCS
../../libinput/context.cpp
../../libinput/device.cpp
../../libinput/events.cpp
../../libinput/libinput_logging.cpp
../../logind.cpp
context_test.cpp
mock_libinput.cpp
mock_udev.cpp
)
add_executable(testLibinputContext ${testLibinputContext_SRCS})
target_link_libraries(testLibinputContext
LibInputTestObjects
Qt5::DBus
Qt5::Test
Qt5::Widgets
......@@ -107,8 +79,7 @@ ecm_mark_as_test(testLibinputContext)
########################################################
# Test Input Events
########################################################
set(testInputEvents_SRCS input_event_test.cpp mock_libinput.cpp ../../libinput/device.cpp ../../input_event.cpp)
add_executable(testInputEvents ${testInputEvents_SRCS})
target_link_libraries(testInputEvents Qt5::Test Qt5::DBus Qt5::Gui Qt5::Widgets KF5::ConfigCore)
add_executable(testInputEvents input_event_test.cpp ../../input_event.cpp)
target_link_libraries(testInputEvents Qt5::Test Qt5::DBus Qt5::Gui Qt5::Widgets KF5::ConfigCore LibInputTestObjects)
add_test(NAME kwin-testInputEvents COMMAND testInputEvents)
ecm_mark_as_test(testInputEvents)
......@@ -2,7 +2,6 @@
# Config
set(kwin_blur_config_SRCS blur_config.cpp)
ki18n_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})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_blur_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_blur_config blur_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -5,7 +5,6 @@
# Config
set(kwin_coverswitch_config_SRCS coverswitch_config.cpp)
ki18n_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})
......@@ -14,6 +13,7 @@ target_link_libraries(kwin_coverswitch_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_coverswitch_config coverswitch_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -9,7 +9,6 @@ install(FILES data/cubecap.png DESTINATION ${DATA_INSTALL_DIR}/kwin)
set(kwin_cube_config_SRCS cube_config.cpp)
ki18n_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})
......@@ -20,6 +19,7 @@ target_link_libraries(kwin_cube_config
KF5::I18n
KF5::XmlGui
KF5::KIOWidgets
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_cube_config cube_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -3,7 +3,6 @@
set(kwin_cubeslide_config_SRCS cubeslide_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_cubeslide_config
KF5::ConfigWidgets
KF5::I18n
kwineffects
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_cubeslide_config cubeslide_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -6,7 +6,6 @@ install(FILES main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/desktopgrid/
# Config
set(kwin_desktopgrid_config_SRCS desktopgrid_config.cpp)
ki18n_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})
......@@ -19,6 +18,7 @@ target_link_libraries(kwin_desktopgrid_config
KF5::XmlGui
Qt5::Quick
kwineffects
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_desktopgrid_config desktopgrid_config.desktop SERVICE_TYPES kcmodule.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_diminactive_config_SRCS diminactive_config.cpp)
ki18n_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})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_diminactive_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_diminactive_config diminactive_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_flipswitch_config_SRCS flipswitch_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_flipswitch_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_flipswitch_config flipswitch_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_glide_config_SRCS glide_config.cpp)
ki18n_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})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_glide_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_glide_config glide_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -4,7 +4,6 @@
#######################################
# 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})
......@@ -13,6 +12,7 @@ target_link_libraries(kwin_invert_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_invert_config invert_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -5,7 +5,6 @@
# Config
set(kwin_lookingglass_config_SRCS lookingglass_config.cpp)
ki18n_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})
......@@ -15,6 +14,7 @@ target_link_libraries(kwin_lookingglass_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_lookingglass_config lookingglass_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_magiclamp_config_SRCS magiclamp_config.cpp)
ki18n_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})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_magiclamp_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_magiclamp_config magiclamp_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_magnifier_config_SRCS magnifier_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_magnifier_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_magnifier_config magnifier_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -3,7 +3,6 @@
##########################
set(kwin_mouseclick_config_SRCS mouseclick_config.cpp)
ki18n_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})
......@@ -13,6 +12,7 @@ target_link_libraries(kwin_mouseclick_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_mouseclick_config mouseclick_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_mousemark_config_SRCS mousemark_config.cpp)
ki18n_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})
......@@ -13,6 +12,7 @@ target_link_libraries(kwin_mousemark_config
KF5::I18n
KF5::TextWidgets
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_mousemark_config mousemark_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -6,7 +6,6 @@ install(FILES main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindo
# Config
set(kwin_presentwindows_config_SRCS presentwindows_config.cpp)
ki18n_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})
......@@ -17,6 +16,7 @@ target_link_libraries(kwin_presentwindows_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_presentwindows_config presentwindows_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_resize_config_SRCS resize_config.cpp)
ki18n_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})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_resize_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_resize_config resize_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_showfps_config_SRCS showfps_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_showfps_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_showfps_config showfps_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_slide_config_SRCS slide_config.cpp)
ki18n_wrap_ui(kwin_slide_config_SRCS slide_config.ui)
qt5_add_dbus_interface(kwin_slide_config_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
kconfig_add_kcfg_files(kwin_slide_config_SRCS slideconfig.kcfgc)
add_library(kwin_slide_config MODULE ${kwin_slide_config_SRCS})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_slide_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_slide_config slide_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_thumbnailaside_config_SRCS thumbnailaside_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_thumbnailaside_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_thumbnailaside_config thumbnailaside_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -7,7 +7,6 @@ install(FILES data/tm_inner.png data/tm_outer.png DESTINATION ${DATA_INSTALL_DIR
# Config
set(kwin_trackmouse_config_SRCS trackmouse_config.cpp)
ki18n_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})
......@@ -17,6 +16,7 @@ target_link_libraries(kwin_trackmouse_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_trackmouse_config trackmouse_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_windowgeometry_config_SRCS windowgeometry_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_windowgeometry_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_windowgeometry_config windowgeometry_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_wobblywindows_config_SRCS wobblywindows_config.cpp)
ki18n_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})
......@@ -11,6 +10,7 @@ target_link_libraries(kwin_wobblywindows_config
KF5::ConfigWidgets
KF5::I18n
Qt5::DBus
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_wobblywindows_config wobblywindows_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -2,7 +2,6 @@
# Config
set(kwin_zoom_config_SRCS zoom_config.cpp)
ki18n_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})
......@@ -12,6 +11,7 @@ target_link_libraries(kwin_zoom_config
KF5::GlobalAccel
KF5::I18n
KF5::XmlGui
KWinEffectsInterface
)
kcoreaddons_desktop_to_json(kwin_zoom_config zoom_config.desktop SERVICE_TYPES kcmodule.desktop)
......
......@@ -235,4 +235,3 @@ K_PLUGIN_FACTORY_DEFINITION(KWinOptionsFactory,
)
#include "main.moc"
#include "moc_main.cpp"
# KI18N Translation Domain for this library
add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinrules\")
add_definitions(-DKCMRULES)
########### next target ###############
include_directories(../../)
set(kwinrules_MOC_HDRS yesnobox.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h)
qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS})
set(kwinrules_SRCS ../../rulebooksettings.cpp ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp main.cpp ${kwinrules_MOC_SRCS})
set(kwinrules_SRCS ../../rulebooksettings.cpp
../../cursor.cpp
../../plugins/platforms/x11/standalone/x11cursor.cpp
../../rules.cpp
../../placement.cpp
../../utils.cpp
yesnobox.cpp
ruleswidget.cpp
ruleslist.cpp
kwinsrc.cpp
detectwidget.cpp
)
ki18n_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui)
kconfig_add_kcfg_files(kwinrules_SRCS ../../rulesettings.kcfgc)
kconfig_add_kcfg_files(kwinrules_SRCS ../../rulebooksettingsbase.kcfgc)
add_executable(kwin_rules_dialog ${kwinrules_SRCS})
add_library(KWinRulesObjects OBJECT ${kwinrules_SRCS})
set(kwin_kcm_rules_XCB_LIBS
XCB::CURSOR
......@@ -36,19 +44,14 @@ set(kcm_libs
if (KWIN_BUILD_ACTIVITIES)
set(kcm_libs ${kcm_libs} KF5::Activities)
endif()
target_link_libraries(KWinRulesObjects ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
target_link_libraries(kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
add_executable(kwin_rules_dialog main.cpp)
target_link_libraries(kwin_rules_dialog KWinRulesObjects)
install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR})
########### next target ###############
set(kcm_kwinrules_PART_SRCS kcm.cpp ${kwinrules_SRCS})
add_library(kcm_kwinrules MODULE ${kcm_kwinrules_PART_SRCS})
target_link_libraries(kcm_kwinrules ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
add_library(kcm_kwinrules MODULE kcm.cpp)
target_link_libraries(kcm_kwinrules KWinRulesObjects)
install(TARGETS kcm_kwinrules DESTINATION ${PLUGIN_INSTALL_DIR})
########### install files ###############
......
......@@ -16,15 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
// Include some code from kwin core in order to avoid
// double implementation.
#include "../../cursor.cpp"
#include "../../plugins/platforms/x11/standalone/x11cursor.cpp"
#include "../../rules.cpp"
#include "../../placement.cpp"
#include "../../options.cpp"
#include "../../utils.cpp"
#include <input.h>
KWin::InputRedirection *KWin::InputRedirection::s_self = nullptr;
......
/*
* Copyright (c) 2011 Thomas Lübking <thomas.luebking@web.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "yesnobox.h"
YesNoBox::YesNoBox( QWidget *parent )
: QWidget(parent)
{
QHBoxLayout *l = new QHBoxLayout(this);
l->setContentsMargins(0, 0, 0, 0);
l->addWidget(yes = new QRadioButton(i18n("Yes"), this));
l->addWidget(no = new QRadioButton(i18n("No"), this));
l->addStretch(100);
no->setChecked(true);
connect(yes, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool)));
connect(yes, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
connect(no, SIGNAL(clicked(bool)), this, SLOT(noClicked(bool)));
}
......@@ -28,18 +28,7 @@
class YesNoBox : public QWidget {
Q_OBJECT
public:
explicit YesNoBox( QWidget *parent ) : QWidget(parent)
{
QHBoxLayout *l = new QHBoxLayout(this);
l->setContentsMargins(0, 0, 0, 0);
l->addWidget(yes = new QRadioButton(i18n("Yes"), this));
l->addWidget(no = new QRadioButton(i18n("No"), this));
l->addStretch(100);
no->setChecked(true);
connect(yes, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool)));
connect(yes, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
connect(no, SIGNAL(clicked(bool)), this, SLOT(noClicked(bool)));
}
explicit YesNoBox( QWidget *parent );
bool isChecked() { return yes->isChecked(); }
public Q_SLOTS:
void setChecked(bool b) { yes->setChecked(b); }
......
......@@ -29,5 +29,3 @@ void PlastikPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
engine->addImageProvider(QLatin1String("plastik"), new KWin::PlastikButtonProvider());
QQmlExtensionPlugin::initializeEngine(engine, uri);
}
#include "moc_plastikplugin.cpp"
......@@ -77,6 +77,13 @@ StrutRect &StrutRect::operator=(const StrutRect &other)
#endif
Process::Process(QObject *parent)
: QProcess(parent)
{
}
Process::~Process() = default;
#ifndef KCMRULES
void updateXTime()
{
......@@ -135,13 +142,6 @@ void ungrabXKeyboard()
xcb_ungrab_keyboard(connection(), XCB_TIME_CURRENT_TIME);
}
Process::Process(QObject *parent)