kwin/tabbox/tests/CMakeLists.txt
Martin Gräßlin 83b9cb6697 Verify QVariant is valid before casting to Client*
If the ClientModel does not contain any Clients, which can
happen if there is no desktop window, accessing the data of a
ModelIndex returns an invalid QVariant. Because of that it
needs to be ensured that the QVariant is valid before trying to
cast it to a Client Pointer.

BUG: 304620
FIXED-IN: 4.9.1
REVIEW: 105935
2012-08-17 17:48:15 +02:00

35 lines
1.3 KiB
CMake

########################################################
# Test TabBox::ClientModel
########################################################
set( testTabBoxClientModel_SRCS
../clientmodel.cpp
../desktopmodel.cpp
../tabboxconfig.cpp
../tabboxhandler.cpp
test_tabbox_clientmodel.cpp
mock_declarative.cpp
mock_tabboxhandler.cpp
mock_tabboxclient.cpp
)
kde4_add_unit_test( testTabBoxClientModel TESTNAME testTabBoxClientModel ${testTabBoxClientModel_SRCS} )
target_link_libraries( testTabBoxClientModel ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTTEST_LIBRARY} ${X11_LIBRARIES} )
########################################################
# Test TabBox::TabBoxHandler
########################################################
set( testTabBoxHandler_SRCS
../clientmodel.cpp
../desktopmodel.cpp
../tabboxconfig.cpp
../tabboxhandler.cpp
test_tabbox_handler.cpp
mock_declarative.cpp
mock_tabboxhandler.cpp
mock_tabboxclient.cpp
)
kde4_add_unit_test( testTabBoxHandler TESTNAME testTabBoxHandler ${testTabBoxHandler_SRCS} )
target_link_libraries( testTabBoxHandler ${KDE4_KDEUI_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTTEST_LIBRARY} ${X11_LIBRARIES} )