diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-02 13:08:40 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-04 14:13:49 +0000 |
commit | 21ffde85a1b4592d24785a3ba82817de05486060 (patch) | |
tree | 6d449f5df9bd6be92906f234c2438766d95c961e /tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | |
parent | 604e379338e7c9e17c929063148754a30077988c (diff) |
Add option to retain sources when generating QML cache
By default any .qrc files are filtered and QML and JS sources dropped
when generating the cache. The new QTQUICK_COMPILER_RETAINED_RESOURCES
option allows the specification of .qrc files to be kept as they are.
The source fils specified in them will be available to the application.
Change-Id: If45bcd95c29fe4b91f5817573964ff55b1db8a00
Fixes: QTBUG-72430
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp')
-rw-r--r-- | tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp index 97ac466e94..8cfa4cb6af 100644 --- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp +++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp @@ -52,6 +52,7 @@ private slots: void aheadOfTimeCompilation(); void functionExpressions(); void versionChecksForAheadOfTimeUnits(); + void retainedResources(); void workerScripts(); @@ -392,6 +393,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/worker.js")); |