summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-08-29 13:28:48 -0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-31 21:33:00 +0000
commit347c9e2b582a02878fb08e3933a7a88197046113 (patch)
treecc82182c1ef838575cd1156d8d4524c27f3080f8 /tests/auto
parente5a46dd1cfda1c2361b75510c342df15261160ee (diff)
RCC: fix zlib compression when --no-zstd was specified
Since we had code to default to zstd as the default algorithm instead of "Best", we ended up not compressing anything. [ChangeLog][rcc] Fixed a bug that caused rcc not to compress files with any compression algorithm if the --no-zstd option was present. Fixes: QTBUG-106012 Change-Id: Ic6547f8247454b47baa8fffd170fddae429f82d2 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit f12321288009119552df10df75c77228f6bac0db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 13508d953a..1631222c08 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -37,6 +37,7 @@ private slots:
void searchPath_data();
void searchPath();
void doubleSlashInRoot();
+ void setLocale_data();
void setLocale();
void lastModified();
void resourcesInStaticPlugins();
@@ -556,13 +557,22 @@ void tst_QResourceEngine::doubleSlashInRoot()
QVERIFY(QFile::exists("://secondary_root/runtime_resource/search_file.txt"));
}
+void tst_QResourceEngine::setLocale_data()
+{
+ QTest::addColumn<QString>("prefix");
+ QTest::newRow("built-in") << QString();
+ QTest::newRow("runtime") << "/runtime_resource/";
+}
+
void tst_QResourceEngine::setLocale()
{
+ QFETCH(QString, prefix);
QLocale::setDefault(QLocale::c());
// default constructed QResource gets the default locale
QResource resource;
- resource.setFileName("aliasdir/aliasdir.txt");
+ resource.setFileName(prefix + "aliasdir/aliasdir.txt");
+ QVERIFY(resource.isValid());
QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression);
// change the default locale and make sure it doesn't affect the resource