summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-05-03 12:16:01 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-05-07 07:59:15 +0000
commitda97dcec3eb8f52523c9950b9a00d893bd88c27b (patch)
treeaf1a0b5c95dfb9bc77f21864d3d02dab44577ae5
parenta27f888dec9c838d5e64496be0e5a5e6d980db32 (diff)
tst_qresourceengine: Fix test for static MSVC builds
The test relies on the existence of qt-project.org in resources. It contains mimetype data and is automatically added. For static builds on MSVC it is only added if it is actually needed though. Change-Id: Icd1d74466607196f9b635205f7cb4d9b300ec4b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 9de2aabd31..b7e85e8f05 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
{
@@ -344,6 +345,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);