[Pkg-owncloud-commits] [owncloud-client] 87/498: AccountManager: save the config after removing an account

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:38 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 3a7bd3f95cb1ec1fe5d888a05276f5a39d54506a
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue May 12 15:37:16 2015 +0200

    AccountManager: save the config after removing an account
---
 src/gui/accountmanager.cpp  | 4 ++++
 src/gui/accountsettings.cpp | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp
index 819ecea..8484899 100644
--- a/src/gui/accountmanager.cpp
+++ b/src/gui/accountmanager.cpp
@@ -213,6 +213,10 @@ void AccountManager::deleteAccount(AccountState* account)
     if (it == _accounts.end()) { return; }
     auto copy = *it; // keep a reference to the shared pointer so it does not delete it just yet
     _accounts.erase(it);
+
+    QScopedPointer<QSettings> settings(Account::settingsWithGroup(QLatin1String(accountsC)));
+    settings->remove(account->account()->id());
+
     accountRemoved(account);
 }
 
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 6cfe4d2..a0b8267 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -658,7 +658,9 @@ void AccountSettings::slotDeleteAccount()
         return;
     }
 
-    AccountManager::instance()->deleteAccount(_accountState);
+    auto manager = AccountManager::instance();
+    manager->deleteAccount(_accountState);
+    manager->save();
 }
 
 

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