[Pkg-owncloud-commits] [owncloud-client] 208/498: QuotaInfo: make sure that we always check the quota every 30 seconds

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 51c10de6721ab792e5144fa6911865fc50ad3e9f
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Jun 26 18:04:27 2015 +0200

    QuotaInfo: make sure that we always check the quota every 30 seconds
---
 src/gui/quotainfo.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gui/quotainfo.cpp b/src/gui/quotainfo.cpp
index 0b2475f..9035a1c 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();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list