2d4b67d361
It's not really needed, the required functionality can be achieved in a more implicit way. The reply pointer is managed by the Wrapper class as long as the method take() is not invoked. This method follows the semantics of QScopedPointer::take(). That is the pointer is set to null and the responsibility to free the pointer is passed to the callee. By this change we do not have the overhead of creating a QSharedPointer. In addition the Wrapper provides a copy ctor and assignment operator also using the semantics of take().
68 lines
2.7 KiB
CMake
68 lines
2.7 KiB
CMake
set( testUpdateKWin49_SRCS test_update_kwin_49.cpp ../data/update_kwin_49.cpp ../tabbox/tabboxconfig.cpp )
|
|
kde4_add_unit_test( testUpdateKWin49 TESTNAME kwin-TestUpdateKWin49 ${testUpdateKWin49_SRCS} )
|
|
|
|
target_link_libraries( testUpdateKWin49 ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY} )
|
|
|
|
########################################################
|
|
# Test ScreenPaintData
|
|
########################################################
|
|
set( testScreenPaintData_SRCS test_screen_paint_data.cpp )
|
|
kde4_add_unit_test( testScreenPaintData TESTNAME kwin-TestScreenPaintData ${testScreenPaintData_SRCS} )
|
|
|
|
target_link_libraries( testScreenPaintData kwineffects ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} )
|
|
|
|
########################################################
|
|
# Test WindowPaintData
|
|
########################################################
|
|
set( testWindowPaintData_SRCS test_window_paint_data.cpp )
|
|
kde4_add_unit_test( testWindowPaintData TESTNAME kwin-TestWindowPaintData ${testWindowPaintData_SRCS} )
|
|
|
|
target_link_libraries( testWindowPaintData kwineffects ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTTEST_LIBRARY} )
|
|
|
|
########################################################
|
|
# Test VirtualDesktopManager
|
|
########################################################
|
|
set( testVirtualDesktops_SRCS
|
|
test_virtual_desktops.cpp
|
|
../virtualdesktops.cpp
|
|
)
|
|
kde4_add_unit_test( testVirtualDesktops TESTNAME kwin-TestVirtualDesktops ${testVirtualDesktops_SRCS} )
|
|
|
|
target_link_libraries( testVirtualDesktops
|
|
${KDE4_KDEUI_LIBS}
|
|
${QT_QTCORE_LIBRARY}
|
|
${QT_QTTEST_LIBRARY}
|
|
)
|
|
|
|
########################################################
|
|
# Test ClientMachine
|
|
########################################################
|
|
set( testClientMachine_SRCS
|
|
test_client_machine.cpp
|
|
../client_machine.cpp
|
|
)
|
|
kde4_add_unit_test( testClientMachine TESTNAME kwin-TestClientMachine ${testClientMachine_SRCS} )
|
|
|
|
target_link_libraries( testClientMachine
|
|
${QT_QTTEST_LIBRARY}
|
|
${QT_QTCORE_LIBRARY}
|
|
${KDE4_KDEUI_LIBS}
|
|
${XCB_XCB_LIBRARIES}
|
|
${X11_XCB_LIBRARIES}
|
|
)
|
|
|
|
########################################################
|
|
# Test XcbWrapper
|
|
########################################################
|
|
set( testXcbWrapper_SRCS
|
|
test_xcb_wrapper.cpp
|
|
)
|
|
kde4_add_unit_test( testXcbWrapper TESTNAME kwin-TestXcbWrapper ${testXcbWrapper_SRCS} )
|
|
|
|
target_link_libraries( testXcbWrapper
|
|
${QT_QTTEST_LIBRARY}
|
|
${QT_QTCORE_LIBRARY}
|
|
${QT_QTGUI_LIBRARY}
|
|
${XCB_XCB_LIBRARIES}
|
|
${X11_XCB_LIBRARIES}
|
|
)
|