From 7a5644d6481a3c1a7416772998ca4e60c977bfbd Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 8 Oct 2017 18:31:26 +0200 Subject: 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 --- src/corelib/mimetypes/qmimeglobpattern_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/mimetypes/qmimeglobpattern_p.h') diff --git a/src/corelib/mimetypes/qmimeglobpattern_p.h b/src/corelib/mimetypes/qmimeglobpattern_p.h index 21332e71bc..103729c4ff 100644 --- a/src/corelib/mimetypes/qmimeglobpattern_p.h +++ b/src/corelib/mimetypes/qmimeglobpattern_p.h @@ -152,7 +152,7 @@ public: void addGlob(const QMimeGlobPattern &glob); void removeMimeType(const QString &mimeType); - QMimeGlobMatchResult matchingGlobs(const QString &fileName) const; + void matchingGlobs(const QString &fileName, QMimeGlobMatchResult &result) const; void clear(); PatternsMap m_fastPatterns; // example: "doc" -> "application/msword", "text/plain" -- cgit v1.2.3