summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/mimetypes
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2017-10-08 18:31:26 +0200
committerDavid Faure <david.faure@kdab.com>2017-11-30 12:54:49 +0000
commit7a5644d6481a3c1a7416772998ca4e60c977bfbd (patch)
treed9667bb9597342cd0c9e832d60061e6e45790c3a /tests/auto/corelib/mimetypes
parent8835c0376befd009702b9a17c506639e31c842b9 (diff)
QMimeDatabase: redesign to use both binary and XML providers
Previously, we would use mime.cache in all mime directories if at least one of them had such a file (other than the most-local one), otherwise the "source" XML would be used in all directories. Now it's possible to use mime.cache in those directories which have one, and XML in those directories that don't. Not only is this more correct, it will allow in a subsequent commit to bundle the binary cache in QtCore's qrc rather than the very big XML file. The design change to allow this is that now every provider only deals with a single directory, and QMimeDatabasePrivate takes care of creating multiple providers, one for each dir. This required to move most of the loops from the binary provider up to QMimeDatabasePrivate itself. Change-Id: Iac82d5f5836b80d45076e586b903d16fa2525b34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/mimetypes')
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index 8883b6360f..ad45daade9 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -148,7 +148,7 @@ void tst_QMimeDatabase::initTestCase()
qDebug() << "\nGlobal XDG_DATA_DIRS: " << m_globalXdgDir;
const QString freeDesktopXml = QStringLiteral("freedesktop.org.xml");
- const QString xmlFileName = QLatin1String(RESOURCE_PREFIX) + freeDesktopXml;
+ const QString xmlFileName = QLatin1String(RESOURCE_PREFIX "packages/") + freeDesktopXml;
const QString xmlTargetFileName = globalPackageDir + QLatin1Char('/') + freeDesktopXml;
QVERIFY2(copyResourceFile(xmlFileName, xmlTargetFileName, &errorMessage), qPrintable(errorMessage));
#endif