Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2016-03-01 18:08:23 +0300
committerChristian Kamm <mail@ckamm.de>2016-03-01 18:08:23 +0300
commitd521232587bca2b01afb1b2174b26788d10408dc (patch)
tree652e4826f668daedff6dd33aefe2445dab107110 /src/gui/accountmanager.h
parent10e8f03ea4e1bbc63a99526b7c56f777c3a81c67 (diff)
AccountState: Allow storing state in settings
This will be useful if we ever want to store account-level gui state. I built this originally because I thought a paused account would be this kind of state.
Diffstat (limited to 'src/gui/accountmanager.h')
-rw-r--r--src/gui/accountmanager.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gui/accountmanager.h b/src/gui/accountmanager.h
index 0aea939e8..321a6ec38 100644
--- a/src/gui/accountmanager.h
+++ b/src/gui/accountmanager.h
@@ -76,15 +76,24 @@ public:
static AccountPtr createAccount();
private:
- void save(const AccountPtr& account, QSettings& settings, bool saveCredentials = true);
- AccountPtr load(QSettings& settings);
+ // saving and loading Account to settings
+ void saveAccountHelper(Account* account, QSettings& settings, bool saveCredentials = true);
+ AccountPtr loadAccountHelper(QSettings& settings);
+
bool restoreFromLegacySettings();
bool isAccountIdAvailable(const QString& id) const;
QString generateFreeAccountId() const;
+ // Adds an account to the tracked list, emitting accountAdded()
+ void addAccountState(AccountState* accountState);
+
public slots:
- void wantsAccountSavedSlot(AccountPtr a);
+ /// Saves account data, not including the credentials
+ void saveAccount(Account* a);
+
+ /// Saves account state data, not including the account
+ void saveAccountState(AccountState* a);
Q_SIGNALS: