summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/qmimedatabase_p.h
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2017-10-08 21:43:10 +0200
committerDavid Faure <david.faure@kdab.com>2017-11-30 12:54:45 +0000
commit8835c0376befd009702b9a17c506639e31c842b9 (patch)
treee2a0487ec11eb9893916033ad5ce21b5660f9e3f /src/corelib/mimetypes/qmimedatabase_p.h
parent916266a7b3538c3d31abe245ee84e691934fab40 (diff)
QMimeDatabase: move recheck test up from the mime providers
This is actually simpler (two calls to ensureLoaded are enough, rather than one in every implementation method) and is necessary for further refactoring steps (which will instanciate more provider instances). Change-Id: I9fb8acf3556515babecb88ba88e25af43937af5a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/mimetypes/qmimedatabase_p.h')
-rw-r--r--src/corelib/mimetypes/qmimedatabase_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h
index 5dfcf31237..93bdd24b6f 100644
--- a/src/corelib/mimetypes/qmimedatabase_p.h
+++ b/src/corelib/mimetypes/qmimedatabase_p.h
@@ -60,6 +60,7 @@
#include "qmimeglobpattern_p.h"
#include <QtCore/qmutex.h>
+#include <QtCore/qelapsedtimer.h>
QT_BEGIN_NAMESPACE
@@ -100,8 +101,10 @@ public:
private:
QMimeProviderBase *provider();
+ bool shouldCheck();
mutable QMimeProviderBase *m_provider;
+ QElapsedTimer m_lastCheck;
public:
const QString m_defaultMimeType;