diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2015-06-26 19:04:27 +0300 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2015-06-26 19:04:27 +0300 |
commit | 51c10de6721ab792e5144fa6911865fc50ad3e9f (patch) | |
tree | 46c5262be46e87af9a95e61cb3f7bdb80180abf7 /src/gui/quotainfo.cpp | |
parent | 236951d9b33c4fe899e23b20cfee2b34ee8566aa (diff) |
QuotaInfo: make sure that we always check the quota every 30 seconds
Diffstat (limited to 'src/gui/quotainfo.cpp')
-rw-r--r-- | src/gui/quotainfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/quotainfo.cpp b/src/gui/quotainfo.cpp index 0b2475f6c..9035a1c9e 100644 --- a/src/gui/quotainfo.cpp +++ b/src/gui/quotainfo.cpp @@ -50,11 +50,11 @@ void QuotaInfo::setActive(bool active) void QuotaInfo::slotAccountStateChanged() { if (canGetQuota()) { - if (_lastQuotaRecieved.isNull() - || _lastQuotaRecieved.msecsTo(QDateTime::currentDateTime()) > defaultIntervalT) { + auto elapsed = _lastQuotaRecieved.msecsTo(QDateTime::currentDateTime()); + if (_lastQuotaRecieved.isNull() || elapsed >= defaultIntervalT) { slotCheckQuota(); } else { - _jobRestartTimer.start(defaultIntervalT); + _jobRestartTimer.start(defaultIntervalT - elapsed); } } else { _jobRestartTimer.stop(); |