[Pkg-owncloud-commits] [owncloud-client] 252/498: AccountState: fix Sing-in of a connected account

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:55 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 f87d0139e140bf29d4ce470e74b0d48a67dbc055
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Jul 7 14:44:16 2015 +0200

    AccountState: fix Sing-in of a connected account
    
    Issue #3413
    
    There was two problem:
     - First, when singing in we were setting an account that was connected
       to disconnected  (AccountState::State)
     - Second, while getting the result from the ConnectionValidator, we would
       not set the state to connected if the previous call to ConnectionValidator
       was ConnectionValidator::Connected, regardless of the old state of the account
---
 src/gui/accountstate.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index 57c658d..2483576 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -115,7 +115,7 @@ void AccountState::setSignedOut(bool signedOut)
 {
     if (signedOut) {
         setState(SignedOut);
-    } else {
+    } else if (_state == SignedOut) {
         setState(Disconnected);
     }
 }
@@ -173,7 +173,6 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
         return;
     }
 
-    auto oldStatus = _connectionStatus;
     if (_connectionStatus != status) {
         qDebug() << "AccountState connection status change: "
                  << connectionStatusString(_connectionStatus) << "->"
@@ -185,7 +184,7 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
     switch (status)
     {
     case ConnectionValidator::Connected:
-        if (oldStatus != ConnectionValidator::Connected) {
+        if (_state != Connected) {
             setState(Connected);
         }
         break;

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