diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-08 20:43:45 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-08 20:43:45 +0200 |
commit | b5a956601f369e961d6863126f8facc61bb6df1f (patch) | |
tree | 25e4021518b254ef76c410244dd6581432bf285f /tests/auto/corelib/io/qresourceengine | |
parent | 290f953253afc5935382525cd4b72e091865cab5 (diff) | |
parent | 1b7337d23dbc767ba482d9051180f10d77052913 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro
Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
Diffstat (limited to 'tests/auto/corelib/io/qresourceengine')
-rw-r--r-- | tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro | 2 | ||||
-rw-r--r-- | tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro b/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro index 9478595df6..3838a72c21 100644 --- a/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro +++ b/tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro @@ -29,3 +29,5 @@ win32 { LIBS += -Lstaticplugin } LIBS += -lmoctestplugin + +builtin_testdata: DEFINES += BUILTIN_TESTDATA diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index 3f0e68c1b8..ffa7bab6d9 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -29,6 +29,7 @@ #include <QtTest/QtTest> #include <QtCore/QCoreApplication> +#include <QtCore/QMimeDatabase> class tst_QResourceEngine: public QObject { @@ -127,9 +128,19 @@ void tst_QResourceEngine::checkStructure_data() rootContents.insert(1, QLatin1String("android_testdata")); #endif +#if defined(BUILTIN_TESTDATA) + rootContents.insert(8, QLatin1String("testqrc")); +#endif + + QTest::newRow("root dir") << QString(":/") << QString() - << (QStringList() << "search_file.txt") + << (QStringList() +#if defined(BUILTIN_TESTDATA) + << "parentdir.txt" + << "runtime_resource.rcc" +#endif + << "search_file.txt") << rootContents << QLocale::c() << qlonglong(0); @@ -336,6 +347,11 @@ void tst_QResourceEngine::checkStructure() QFETCH(QLocale, locale); QFETCH(qlonglong, contentsSize); + // We rely on the existence of the root "qt-project.org" in resources. For + // static builds on MSVC these resources are only added if they are used. + QMimeDatabase db; + Q_UNUSED(db); + bool directory = (containedDirs.size() + containedFiles.size() > 0); QLocale::setDefault(locale); |