MimeDatabase: Don't pollute global namespace

Task-number: QTCREATORBUG-16119
Change-Id: If234669adf19ccf84b76b99c1a71574f3859eaf1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Eike Ziller
2016-05-18 11:26:49 +02:00
parent 38a3839a10
commit a63a024b8a

View File

@@ -75,12 +75,12 @@ MimeProviderBase::MimeProviderBase(MimeDatabasePrivate *db)
{ {
} }
int qmime_secondsBetweenChecks = 5; static int mime_secondsBetweenChecks = 5;
bool MimeProviderBase::shouldCheck() bool MimeProviderBase::shouldCheck()
{ {
const QDateTime now = QDateTime::currentDateTime(); const QDateTime now = QDateTime::currentDateTime();
if (m_lastCheck.isValid() && m_lastCheck.secsTo(now) < qmime_secondsBetweenChecks) if (m_lastCheck.isValid() && m_lastCheck.secsTo(now) < mime_secondsBetweenChecks)
return false; return false;
m_lastCheck = now; m_lastCheck = now;
return true; return true;