diff options
-rw-r--r-- | tests/auto/qml/qqmlstatemachine/CMakeLists.txt | 14 | ||||
-rw-r--r-- | tests/auto/qml/qqmlstatemachine/tst_qqmlstatemachine.cpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qml/qqmlstatemachine/CMakeLists.txt b/tests/auto/qml/qqmlstatemachine/CMakeLists.txt index 04a975d..70f3da8 100644 --- a/tests/auto/qml/qqmlstatemachine/CMakeLists.txt +++ b/tests/auto/qml/qqmlstatemachine/CMakeLists.txt @@ -3,6 +3,12 @@ ## tst_qqmlstatemachine Test: ##################################################################### +# Collect test data +file(GLOB_RECURSE test_data_glob + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + data/*) +list(APPEND test_data ${test_data_glob}) + qt_internal_add_test(tst_qqmlstatemachine SOURCES ../../shared/util.cpp ../../shared/util.h @@ -16,6 +22,7 @@ qt_internal_add_test(tst_qqmlstatemachine Qt::QmlPrivate Qt::StateMachineQmlPrivate Qt::TestPrivate + TESTDATA ${test_data} ) ## Scopes: @@ -30,10 +37,3 @@ qt_internal_extend_target(tst_qqmlstatemachine CONDITION NOT ANDROID AND NOT IOS DEFINES QT_QMLTEST_DATADIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/data\\\" ) - -qt_internal_add_resource(tst_qqmlstatemachine "tst_qqmlstatemachine" - PREFIX - "/" - FILES - "data/signaltransition.qml" -) diff --git a/tests/auto/qml/qqmlstatemachine/tst_qqmlstatemachine.cpp b/tests/auto/qml/qqmlstatemachine/tst_qqmlstatemachine.cpp index 938821a..2f1f7a6 100644 --- a/tests/auto/qml/qqmlstatemachine/tst_qqmlstatemachine.cpp +++ b/tests/auto/qml/qqmlstatemachine/tst_qqmlstatemachine.cpp @@ -121,7 +121,7 @@ void tst_qqmlstatemachine::tst_bindings() // Generating QQmlScriptString requires proper qml context setup, and here we // use same the element that we are testing to create the testing material QQmlEngine engine; - QQmlComponent component(&engine, QUrl(QLatin1String("qrc:///data/signaltransition.qml"))); + QQmlComponent component(&engine, testFileUrl("signaltransition.qml")); std::unique_ptr<QObject> obj(component.create()); SignalTransition *st1 = qobject_cast<SignalTransition*>(obj->findChild<QObject*>("st1")); SignalTransition *st2 = qobject_cast<SignalTransition*>(obj->findChild<QObject*>("st2")); |