kdelibs/kdeui/tests/CMakeLists.txt
Ivailo Monev 594e901c4a kdeui: rework KGlobalAccel
global shortcut resolution (the KGlobalAccel methods) work on
application level, X11 as far as I can tell does not have a method to
tell which application has grabbed a key (to fill KGlobalShortcutInfo).
other than that no configuration interface for global shortcuts (not by
KGlobalAccel itself, plasma and its applets have interface for that),
also the shortcuts interface did not and still does not handle global
shortcuts well so that is something to look into.

one of the problems solved with this change is the fact that multiple
plasma applets (e.g. multiple instances of the keyboard applet) could
not use the same shortcut, now it is possible. as for which applet gets
the shortcut action it is the one that has the grab first - that is how
key grabbing works in X11

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-22 00:07:35 +03:00

70 lines
1.8 KiB
CMake

include_directories( ${KDE4_KDEUI_INCLUDES} )
MACRO(KDEUI_UNIT_TESTS)
FOREACH(_testname ${ARGN})
if(EXISTS ${_testname}.h)
kde4_add_test(kdeui-${_testname} ${_testname}.cpp ${_testname}.h)
else()
kde4_add_test(kdeui-${_testname} ${_testname}.cpp)
endif()
target_link_libraries(kdeui-${_testname}
${QT_QTTEST_LIBRARY}
${QT_QTXML_LIBRARY}
kdeui
)
ENDFOREACH(_testname)
ENDMACRO(KDEUI_UNIT_TESTS)
MACRO(KDEUI_EXECUTABLE_TESTS)
FOREACH(_testname ${ARGN})
if(EXISTS ${_testname}.h)
kde4_add_manual_test(kdeui-${_testname} ${_testname}.cpp ${_testname}.h)
else()
kde4_add_manual_test(kdeui-${_testname} ${_testname}.cpp)
endif()
target_link_libraries(kdeui-${_testname}
${QT_QTTEST_LIBRARY}
${QT_QTXML_LIBRARY}
kdeui
)
ENDFOREACH(_testname)
ENDMACRO(KDEUI_EXECUTABLE_TESTS)
KDEUI_UNIT_TESTS(
kactioncollectiontest
kbuttongrouptest
kcompletioncoretest
kconfigskeletontest
kdualactiontest
kfindtest
kglobalsettingstest
kmainwindow_unittest
klineedit_unittest
kcombobox_unittest
kdialog_unittest
kreplacetest
kshortcuttest
kstandardshortcuttest
kuniqueapptest
kstartupinfo_unittest
kcolorutilstest
kxmlgui_unittest
kiconloader_unittest
ktabwidget_unittest
ktoolbar_unittest
kselectaction_unittest
klistwidgetsearchlinetest
kconfigdialog_unittest
klinkitemselectionmodeltest
kstandardactiontest
ktextedit_unittest
kactioncategorytest
kapplication_unittest
kconfigguitest
)
KDEUI_EXECUTABLE_TESTS(
kglobalsettingsclient # helper program for kglobalsettingstest
kwindowtest
fixx11h_test
fixx11h_test2
)