@@ -73,8 +73,10 @@ add_dashview_try_test(horizontaljournal HorizontalJournal)
73add_dashview_try_test(organicgrid OrganicGrid)
73add_dashview_try_test(organicgrid OrganicGrid)
75# Install data files needed for tests
75# Install data files needed for tests
76−file(GLOB qml_files *.qml)
76+file(GLOB qml_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.qml)
77−install(FILES ${qml_files} DESTINATION "${SHELL_APP_DIR}/tests/plugins/Dash")
77+foreach(qml_file ${qml_files})
78+ add_qml_test_data(. "${qml_file}")
79# CardCreator test
81# CardCreator test
80add_executable(CardCreatorTestExec cardcreatortest.cpp)
82add_executable(CardCreatorTestExec cardcreatortest.cpp)
@@ -88,7 +90,9 @@ install(DIRECTORY cardcreator DESTINATION "${SHELL_APP_DIR}/tests/plugins/Dash")
89# This one qml file imports a file in an arch-specific directory, so to make its
91# This one qml file imports a file in an arch-specific directory, so to make its
90# import line relative, we install it into an arch-specific directory too.
92# import line relative, we install it into an arch-specific directory too.
93+add_qml_test_data(. cardcreatortest.qml
91−install(FILES cardcreatortest.qml DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash")
94+ DESTINATION "${SHELL_PRIVATE_LIBDIR}/tests/plugins/Dash"
93# plain qml test
97# plain qml test
94foreach(dash_test ScopeStyle ListViewWithPageHeaderQML CardAttributes CroppedImageMinimumSourceSize)
98foreach(dash_test ScopeStyle ListViewWithPageHeaderQML CardAttributes CroppedImageMinimumSourceSize)