diff options
author | David Faure <faure@kde.org> | 2012-01-14 00:48:30 +0100 |
---|---|---|
committer | Wolf-Michael Bolle <wolf-michael.bolle@nokia.com> | 2012-01-23 13:38:29 +0100 |
commit | ab50d0312ecec6fdc7f570ba32a13428c8c8f090 (patch) | |
tree | 1ce60fb5bbf8336ed3a9eb9dca45f053fa7de1ca /src/mimetypes/qmimeglobpattern_p.h | |
parent | e8a26d9f4e081f8fab37dec38322515e72272556 (diff) |
Implement support for noticing new or modified mimetypes at runtime.
The binary provider checks the mtime of the mime.cache files, and
re-lists mime.cache files (not more often than once every 5 seconds).
Upon a change, it simply has to close, open and map() the file again.
The XML provider checks the list of xml files found (not more often
than once every 5 seconds) and if the list changes, reloads everything.
With unit tests for adding and removing a mimetype xml file, both
in an existing dir (global) and into a new dir (local).
Change-Id: I6347b95502c26b76c05e7fbc7028b62acb240005
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Wolf-Michael Bolle <wolf-michael.bolle@nokia.com>
Diffstat (limited to 'src/mimetypes/qmimeglobpattern_p.h')
-rw-r--r-- | src/mimetypes/qmimeglobpattern_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mimetypes/qmimeglobpattern_p.h b/src/mimetypes/qmimeglobpattern_p.h index 1547101..1bea4c9 100644 --- a/src/mimetypes/qmimeglobpattern_p.h +++ b/src/mimetypes/qmimeglobpattern_p.h @@ -95,6 +95,7 @@ public: void addGlob(const QMimeGlobPattern &glob); void removeMimeType(const QString &mimeType); QStringList matchingGlobs(const QString &fileName, QString *foundSuffix) const; + void clear(); PatternsMap m_fastPatterns; // example: "doc" -> "application/msword", "text/plain" QMimeGlobPatternList m_highWeightGlobs; |