summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-05-31 15:52:52 -0700
committerThiago Macieira <thiago.macieira@intel.com>2019-12-10 15:56:09 -0800
commit0d4dea728ff3b7f15a7ddb22d94c54087e98f53d (patch)
tree8dd07c8eeda34051984b20a657edbaca5a054fe3 /tests/auto
parente6de661a8aa96b5905ea7ba4cd5d76bd06da3f93 (diff)
MIME: Make the internal database direct content, not a Qt resource
This saves us from having to bootstrap rcc in regular (non-cross) compilations, as it can now link to QtCore. Actually un-bootstrapping rcc is left as an exercise for the reader. This commit discovered that MSVC cannot handle constexpr arrays bigger than 256 kB, at which point it simply starts claiming that the constant expressions using it are not constexpr. ICC has a similar problem at 64 kB, but it tells you why ("note: type "const unsigned char [65537]" too large for constant-expression evaluation"). Note also that this requires gzip or zstd to be in PATH for compression to happen. RCC linked to zlib, which is always present due to the bundled copy. gzip's presence is not likely to be a problem on Unix systems, but could be for Windows users, especially MSVC ones. If gzip is not present, QtCore's size will increase by about 1910 kB of read-only (sharable) data. Change-Id: I2b1955a995ad40f3b89afffd15a3e65a94670242 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index 44c8c4b681..bdbc1c6928 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -30,7 +30,6 @@
#include <QtTest/QtTest>
#include <QtCore/QCoreApplication>
-#include <QtCore/QMimeDatabase>
class tst_QResourceEngine: public QObject
{
@@ -119,24 +118,20 @@ void tst_QResourceEngine::checkStructure_data()
QStringList rootContents;
rootContents << QLatin1String("aliasdir")
+#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
+ << QLatin1String("android_testdata")
+#endif
<< QLatin1String("otherdir")
- << QLatin1String("qt-project.org")
<< QLatin1String("runtime_resource")
<< QLatin1String("searchpath1")
<< QLatin1String("searchpath2")
<< QLatin1String("secondary_root")
<< QLatin1String("staticplugin")
<< QLatin1String("test")
- << QLatin1String("withoutslashes");
-
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
- rootContents.insert(1, QLatin1String("android_testdata"));
-#endif
-
#if defined(BUILTIN_TESTDATA)
- rootContents.insert(9, QLatin1String("testqrc"));
+ << QLatin1String("testqrc")
#endif
-
+ << QLatin1String("withoutslashes");
QTest::newRow("root dir") << QString(":/")
<< QByteArray()
@@ -352,11 +347,6 @@ 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);