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:
authorOlivier Goffart <ogoffart@woboq.com>2015-04-17 18:56:17 +0300
committerOlivier Goffart <ogoffart@woboq.com>2015-04-17 18:56:17 +0300
commita932eac832b442cca763197240f036905dd284da (patch)
treee051a71ad8e0605deb5ab12f1138ad562c73019f /src/gui/accountstate.h
parent2da3bfb96f2e1ac0860e28903c1956065627f5d2 (diff)
Multi-account WIP
Diffstat (limited to 'src/gui/accountstate.h')
-rw-r--r--src/gui/accountstate.h30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h
index 8da575be4..2dae899ab 100644
--- a/src/gui/accountstate.h
+++ b/src/gui/accountstate.h
@@ -27,29 +27,6 @@ class AccountState;
class Account;
class AbstractCredentials;
-class AccountStateManager : public QObject {
- Q_OBJECT
-public:
- static AccountStateManager *instance();
-
- AccountStateManager();
- ~AccountStateManager();
-
- AccountState *accountState() { return _accountState; }
-
-signals:
- void accountStateAdded(AccountState *accountState);
- void accountStateRemoved(AccountState *accountState);
-
-private slots:
- void slotAccountAdded(AccountPtr account);
-
-private:
- void setAccountState(AccountState *account);
-
- AccountState *_accountState;
-};
-
/**
* @brief Extra info about an ownCloud server account.
*/
@@ -108,6 +85,9 @@ public:
/// connection status and errors.
void checkConnectivity();
+ // The name of the account as shown in the toolbar
+ QString displayName();
+
private:
void setState(State state);
@@ -120,9 +100,7 @@ protected Q_SLOTS:
void slotCredentialsFetched(AbstractCredentials* creds);
private:
- // A strong reference here would keep Account and AccountState
- // alive indefinitely since Account is the parent of AccountState.
- QWeakPointer<Account> _account;
+ AccountPtr _account;
QuotaInfo *_quotaInfo;
State _state;
ConnectionStatus _connectionStatus;