diff options
Diffstat (limited to 'tests/auto/qml/qmlcachegen')
-rw-r--r-- | tests/auto/qml/qmlcachegen/data/Retain.qml | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/qmlcachegen.pro | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/retain.qrc | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | 8 |
4 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcachegen/data/Retain.qml b/tests/auto/qml/qmlcachegen/data/Retain.qml new file mode 100644 index 0000000000..0e69012662 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/data/Retain.qml @@ -0,0 +1,2 @@ +import QtQml 2.0 +QtObject {} diff --git a/tests/auto/qml/qmlcachegen/qmlcachegen.pro b/tests/auto/qml/qmlcachegen/qmlcachegen.pro index 7f8e93d101..7bd4414302 100644 --- a/tests/auto/qml/qmlcachegen/qmlcachegen.pro +++ b/tests/auto/qml/qmlcachegen/qmlcachegen.pro @@ -24,9 +24,12 @@ workerscripts_test.prefix = /workerscripts RESOURCES += \ workerscripts_test \ - trickypaths.qrc + trickypaths.qrc \ + retain.qrc # QTBUG-46375 !win32: RESOURCES += trickypaths_umlaut.qrc +QTQUICK_COMPILER_RETAINED_RESOURCES += retain.qrc + QT += core-private qml-private testlib diff --git a/tests/auto/qml/qmlcachegen/retain.qrc b/tests/auto/qml/qmlcachegen/retain.qrc new file mode 100644 index 0000000000..e5eed9b12f --- /dev/null +++ b/tests/auto/qml/qmlcachegen/retain.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file alias="Retain.qml">data/Retain.qml</file> + </qresource> +</RCC> diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp index e290f21986..5462e6c8ae 100644 --- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp +++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp @@ -54,6 +54,7 @@ private slots: void aheadOfTimeCompilation(); void functionExpressions(); void versionChecksForAheadOfTimeUnits(); + void retainedResources(); void workerScripts(); @@ -401,6 +402,13 @@ void tst_qmlcachegen::versionChecksForAheadOfTimeUnits() QQmlMetaType::removeCachedUnitLookupFunction(testHandler); } +void tst_qmlcachegen::retainedResources() +{ + QFile file(":/Retain.qml"); + QVERIFY(file.open(QIODevice::ReadOnly)); + QVERIFY(file.readAll().startsWith("import QtQml 2.0")); +} + void tst_qmlcachegen::workerScripts() { QVERIFY(QFile::exists(":/workerscripts/data/worker.js")); |