diff options
author | Daniel Molkentin <danimo@owncloud.com> | 2014-02-26 18:05:08 +0400 |
---|---|---|
committer | Daniel Molkentin <danimo@owncloud.com> | 2014-02-26 18:05:15 +0400 |
commit | d4dd5afbe7432c1b05172ff0ad95a0faa1d3ac62 (patch) | |
tree | 393c7b832e5a48da79886d7f6d290cd7df3eb978 | |
parent | 86073001952796ef1fcdcc2605ff00ec98c22c17 (diff) |
Revert "Make "Sign Out" forget the cookies"
This reverts commit 86073001952796ef1fcdcc2605ff00ec98c22c17.
This approach is too dangerous for 1.5.2.
-rw-r--r-- | src/mirall/account.cpp | 12 | ||||
-rw-r--r-- | src/mirall/account.h | 1 | ||||
-rw-r--r-- | src/mirall/application.cpp | 9 |
3 files changed, 4 insertions, 18 deletions
diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp index feb0ac0e7..6a157734a 100644 --- a/src/mirall/account.cpp +++ b/src/mirall/account.cpp @@ -342,16 +342,4 @@ void Account::slotHandleErrors(QNetworkReply *reply , QList<QSslError> errors) } } - -void Account::singOut() -{ - credentials()->invalidateToken(this); - if (_am) { - // Forget all cookies - _am->setCookieJar(new QNetworkCookieJar); - } - setState(Account::SignedOut); -} - - } // namespace Mirall diff --git a/src/mirall/account.h b/src/mirall/account.h index 4c00c8403..6d8df046d 100644 --- a/src/mirall/account.h +++ b/src/mirall/account.h @@ -145,7 +145,6 @@ public: void setState(int state); QuotaInfo *quotaInfo(); - void singOut(); signals: void stateChanged(int state); diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index 8424207f5..de8446660 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -174,16 +174,15 @@ void Application::slotLogout() { Account *a = AccountManager::instance()->account(); if (a) { - // forget the password and cookies and change the state - a->singOut(); - + // invalidate & forget token/password + a->credentials()->invalidateToken(a); // terminate all syncs and unload folders FolderMan *folderMan = FolderMan::instance(); folderMan->setSyncEnabled(false); folderMan->terminateSyncProcess(); folderMan->unloadAllFolders(); - - // Show result + a->setState(Account::SignedOut); + // show result _gui->slotComputeOverallSyncStatus(); } } |