From 087dc42475ad5db57afa01ff84309d680a882d2d Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Tue, 26 Apr 2022 11:38:34 +0200 Subject: Fix tst_qqmltranslation on Android tst_qqmltranslation::translation(qrc) had a problem with incorrectly generated qrc file. This test has two qrc files - one for all test data, as it's usually done for Android, and another one - to test that custom prefixes work properly. The latter resource file had an invalid alias (which included the "data" dir). The reason for the error was that the same data file was already process when the global resources qrc file was generated. At that time the alias prefix was set, and then reused. To fix it we need to explicitly reset the QT_RESOURCE_ALIAS property before generating the second qrc file. Task-number: QTBUG-101865 Change-Id: Ibd7e2a41ffffc3601db9722d155932a3cc9a9b54 Reviewed-by: Ivan Solovev (cherry picked from commit 8976a55dac7436dc2533714319a4c4e4e7f674de) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qml/qqmltranslation/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/qml') diff --git a/tests/auto/qml/qqmltranslation/CMakeLists.txt b/tests/auto/qml/qqmltranslation/CMakeLists.txt index f685e07d9a..396eed518e 100644 --- a/tests/auto/qml/qqmltranslation/CMakeLists.txt +++ b/tests/auto/qml/qqmltranslation/CMakeLists.txt @@ -37,6 +37,13 @@ set_source_files_properties( ) # special case end +# On platforms where TESTDATA is embedded into resources (Android, iOS and +# INTEGRITY), the QT_RESOURCE_ALIAS property was previously set when processing +# TESTDATA, so we need to reset it. Otherwise the wrong alias will be written +# to introspect.qrc, and the related test will fail. +set_source_files_properties(${translation_resource_files} PROPERTIES + QT_RESOURCE_ALIAS "NOTFOUND") + qt_internal_add_resource(tst_qqmltranslation "translation" PREFIX "/" -- cgit v1.2.3