From da97dcec3eb8f52523c9950b9a00d893bd88c27b Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 3 May 2018 12:16:01 +0200 Subject: 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 --- tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 #include +#include 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); -- cgit v1.2.3