[Pkg-owncloud-commits] [owncloud-client] 154/333: Only run the CheckQuota job if the account is connected
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:47 UTC 2014
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 cabcdd890ee3e964d6b5103a4f7d6e12f6b4b06d
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Mon Mar 17 10:35:43 2014 +0100
Only run the CheckQuota job if the account is connected
We use another job to check the connection.
And this may cause wrong password failure as we are still in the wizzard
Fixes #1567
---
src/mirall/quotainfo.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mirall/quotainfo.cpp b/src/mirall/quotainfo.cpp
index 46cf4dd..ac25083 100644
--- a/src/mirall/quotainfo.cpp
+++ b/src/mirall/quotainfo.cpp
@@ -52,10 +52,10 @@ void QuotaInfo::slotAccountStateChanged(int state)
switch (state) {
case Account::SignedOut: // fall through
case Account::InvalidCredidential:
+ case Account::Disconnected:
_jobRestartTimer->stop();
break;
case Account::Connected: // fall through
- case Account::Disconnected:
slotCheckQuota();
}
}
@@ -75,7 +75,8 @@ void QuotaInfo::slotRequestFailed()
void QuotaInfo::slotCheckQuota()
{
- if (!_account.isNull() && _account->credentials() && _account->credentials()->ready()) {
+ if (!_account.isNull() && _account->state() == Account::Connected
+ && _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()));
--
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