diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-07-06 16:09:24 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-07-07 14:33:57 +0200 |
commit | 0efc634a9002f57b7cb08eb11d946d9483da42f8 (patch) | |
tree | 911279a009715cf8a37241f7245b29348e283ad7 /tests/auto/qml/qmlcachegen | |
parent | dd3858cd76f208080ab7916d6c5ea2be0d3513a9 (diff) |
CMake: Fix failing tst_qmlcachegen::skippedResources
The test was failing in CMake configurations because the pro2cmake
generated code set the QT_SKIP_QUICKCOMPILER property on a
non-existing file path (it was missing "data/").
Fix this manually by specifying the correct file path.
Add a SkipQmlCacheGen.qml file to make it more clear what
the file is used for. The previous alias from Retain.qml to Skip.qml
was confusing, and also was overriding the source file properties on
the same file that was part of 2 different resources.
Keep the alias to Skip.qml so we don't have to touch the C++ code.
pro2cmake will be fixed in a separate change to output correct file
paths.
Amends 41890402db086f4c61e052cef7659eb6b003dc77
Task-number: QTBUG-85364
Task-number: QTBUG-84886
Change-Id: I6e49deb8758403241d6f804af797adf2f05fda05
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcachegen')
-rw-r--r-- | tests/auto/qml/qmlcachegen/CMakeLists.txt | 16 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/data/SkipQmlCacheGen.qml | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmlcachegen/data/skip.qrc | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcachegen/CMakeLists.txt b/tests/auto/qml/qmlcachegen/CMakeLists.txt index e20f276cc1..0571d2d3e1 100644 --- a/tests/auto/qml/qmlcachegen/CMakeLists.txt +++ b/tests/auto/qml/qmlcachegen/CMakeLists.txt @@ -71,6 +71,22 @@ qt_add_resource(tst_qmlcachegen "retain" FILES ${retain_resource_files} ) +set_source_files_properties("data/SkipQmlCacheGen.qml" + PROPERTIES QT_RESOURCE_ALIAS "Skip.qml" + QT_SKIP_QUICKCOMPILER 1 +) +set(skip_resource_files + "SkipQmlCacheGen.qml" +) + +qt_add_resource(tst_qmlcachegen "skip" + PREFIX + "/not/" + BASE + "data" + FILES + ${skip_resource_files} +) set(qmake_immediate_resource_files "data/Enums.qml" "data/componentInItem.qml" diff --git a/tests/auto/qml/qmlcachegen/data/SkipQmlCacheGen.qml b/tests/auto/qml/qmlcachegen/data/SkipQmlCacheGen.qml new file mode 100644 index 0000000000..0e69012662 --- /dev/null +++ b/tests/auto/qml/qmlcachegen/data/SkipQmlCacheGen.qml @@ -0,0 +1,2 @@ +import QtQml 2.0 +QtObject {} diff --git a/tests/auto/qml/qmlcachegen/data/skip.qrc b/tests/auto/qml/qmlcachegen/data/skip.qrc index 391e4f7508..1689236b01 100644 --- a/tests/auto/qml/qmlcachegen/data/skip.qrc +++ b/tests/auto/qml/qmlcachegen/data/skip.qrc @@ -1,5 +1,5 @@ <RCC> <qresource prefix="/not/"> - <file alias="Skip.qml">Retain.qml</file> + <file alias="Skip.qml">SkipQmlCacheGen.qml</file> </qresource> </RCC> |