[Pkg-owncloud-commits] [owncloud-client] 73/89: QuotaInfo: Keep polling quota if a previous request fails

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Dec 14 01:02:39 UTC 2013


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 9ffb33293cd7e6ed3b5e8154f6f667fa6d9be59c
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Thu Dec 12 10:53:51 2013 +0100

    QuotaInfo: Keep polling quota if a previous request fails
---
 src/mirall/quotainfo.cpp | 6 ++++++
 src/mirall/quotainfo.h   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/mirall/quotainfo.cpp b/src/mirall/quotainfo.cpp
index e4d7022..ec6d32b 100644
--- a/src/mirall/quotainfo.cpp
+++ b/src/mirall/quotainfo.cpp
@@ -57,11 +57,17 @@ void QuotaInfo::slotAccountStateChanged(int state)
     }
 }
 
+void QuotaInfo::slotRequestFailed()
+{
+    _refreshTimer->start(failIntervalT);
+}
+
 void QuotaInfo::slotCheckQuota()
 {
     if (!_account.isNull() && _account->credentials() && _account->credentials()->ready()) {
         CheckQuotaJob *job = new CheckQuotaJob(_account, "/", this);
         connect(job, SIGNAL(quotaRetrieved(qint64,qint64)), SLOT(slotUpdateLastQuota(qint64,qint64)));
+        connect(job, SIGNAL(networkError(QNetworkReply*)), SLOT(slotRequestFailed()));
         job->start();
     } else {
         _lastQuotaTotalBytes = 0;
diff --git a/src/mirall/quotainfo.h b/src/mirall/quotainfo.h
index 8d48e46..25b8c06 100644
--- a/src/mirall/quotainfo.h
+++ b/src/mirall/quotainfo.h
@@ -35,6 +35,7 @@ public Q_SLOTS:
 private Q_SLOTS:
     void slotAccountChanged(Account *newAccount, Account *oldAccount);
     void slotAccountStateChanged(int state);
+    void slotRequestFailed();
 
 Q_SIGNALS:
     void quotaUpdated(qint64 total, qint64 used);

-- 
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