Commit 1447f464 authored by Martin Flöser's avatar Martin Flöser
Browse files

[autotests] Fix unused function warnings

The functions are defined in a common header but not used in all tests.
This creates needless warning noise, so hide them through an ifdef.
parent 349618c2
...@@ -54,6 +54,7 @@ set( testClientMachine_SRCS ...@@ -54,6 +54,7 @@ set( testClientMachine_SRCS
../client_machine.cpp ../client_machine.cpp
) )
add_executable( testClientMachine ${testClientMachine_SRCS} ) add_executable( testClientMachine ${testClientMachine_SRCS} )
set_target_properties(testClientMachine PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries( testClientMachine target_link_libraries( testClientMachine
Qt5::Concurrent Qt5::Concurrent
...@@ -90,6 +91,7 @@ ecm_mark_as_test(testXcbWrapper) ...@@ -90,6 +91,7 @@ ecm_mark_as_test(testXcbWrapper)
if (XCB_ICCCM_FOUND) if (XCB_ICCCM_FOUND)
add_executable( testXcbSizeHints test_xcb_size_hints.cpp ) add_executable( testXcbSizeHints test_xcb_size_hints.cpp )
set_target_properties(testXcbSizeHints PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries( testXcbSizeHints target_link_libraries( testXcbSizeHints
Qt5::Test Qt5::Test
Qt5::X11Extras Qt5::X11Extras
...@@ -130,6 +132,7 @@ set( testBuiltInEffectLoader_SRCS ...@@ -130,6 +132,7 @@ set( testBuiltInEffectLoader_SRCS
../effectloader.cpp ../effectloader.cpp
) )
add_executable( testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS}) add_executable( testBuiltInEffectLoader ${testBuiltInEffectLoader_SRCS})
set_target_properties(testBuiltInEffectLoader PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries(testBuiltInEffectLoader target_link_libraries(testBuiltInEffectLoader
Qt5::Concurrent Qt5::Concurrent
...@@ -292,6 +295,7 @@ kconfig_add_kcfg_files(testScreenEdges_SRCS ../settings.kcfgc) ...@@ -292,6 +295,7 @@ kconfig_add_kcfg_files(testScreenEdges_SRCS ../settings.kcfgc)
qt5_add_dbus_interface( testScreenEdges_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.freedesktop.ScreenSaver.xml screenlocker_interface) qt5_add_dbus_interface( testScreenEdges_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.freedesktop.ScreenSaver.xml screenlocker_interface)
add_executable( testScreenEdges ${testScreenEdges_SRCS}) add_executable( testScreenEdges ${testScreenEdges_SRCS})
set_target_properties(testScreenEdges PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_include_directories(testScreenEdges BEFORE PRIVATE ./) target_include_directories(testScreenEdges BEFORE PRIVATE ./)
target_link_libraries(testScreenEdges target_link_libraries(testScreenEdges
Qt5::DBus Qt5::DBus
......
add_executable(blendPictureTest blendpicture_test.cpp) add_executable(blendPictureTest blendpicture_test.cpp)
set_target_properties(blendPictureTest PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
add_test(xrenderutils-blendPictureTest blendPictureTest) add_test(xrenderutils-blendPictureTest blendPictureTest)
target_link_libraries(blendPictureTest target_link_libraries(blendPictureTest
kwinxrenderutils kwinxrenderutils
......
...@@ -15,6 +15,7 @@ set( testTabBoxClientModel_SRCS ...@@ -15,6 +15,7 @@ set( testTabBoxClientModel_SRCS
) )
add_executable( testTabBoxClientModel ${testTabBoxClientModel_SRCS} ) add_executable( testTabBoxClientModel ${testTabBoxClientModel_SRCS} )
set_target_properties(testTabBoxClientModel PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries( testTabBoxClientModel target_link_libraries( testTabBoxClientModel
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
...@@ -45,6 +46,7 @@ set( testTabBoxHandler_SRCS ...@@ -45,6 +46,7 @@ set( testTabBoxHandler_SRCS
) )
add_executable( testTabBoxHandler ${testTabBoxHandler_SRCS} ) add_executable( testTabBoxHandler ${testTabBoxHandler_SRCS} )
set_target_properties(testTabBoxHandler PROPERTIES COMPILE_DEFINITIONS "NO_NONE_WINDOW")
target_link_libraries( testTabBoxHandler target_link_libraries( testTabBoxHandler
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
......
...@@ -35,6 +35,7 @@ namespace KWin { ...@@ -35,6 +35,7 @@ namespace KWin {
/** /**
* Wrapper to create an 0,0x10,10 input only window for testing purposes * Wrapper to create an 0,0x10,10 input only window for testing purposes
**/ **/
#ifndef NO_NONE_WINDOW
static xcb_window_t createWindow() static xcb_window_t createWindow()
{ {
xcb_window_t w = xcb_generate_id(connection()); xcb_window_t w = xcb_generate_id(connection());
...@@ -45,14 +46,17 @@ static xcb_window_t createWindow() ...@@ -45,14 +46,17 @@ static xcb_window_t createWindow()
XCB_CW_OVERRIDE_REDIRECT, values); XCB_CW_OVERRIDE_REDIRECT, values);
return w; return w;
} }
#endif
/** /**
* casts XCB_WINDOW_NONE to uint32_t. Needed to make QCOMPARE working. * casts XCB_WINDOW_NONE to uint32_t. Needed to make QCOMPARE working.
**/ **/
#ifndef NO_NONE_WINDOW
static uint32_t noneWindow() static uint32_t noneWindow()
{ {
return XCB_WINDOW_NONE; return XCB_WINDOW_NONE;
} }
#endif
} // namespace } // namespace
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment