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

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-03-18 13:23:45 +0300
committerHannah von Reth <vonreth@kde.org>2021-03-24 13:02:11 +0300
commitc2dae67e916c743397bcdd45a6fae62460747931 (patch)
tree145c15539e1231d999c8175be9bfe3b085f91160 /src/gui/accountmanager.h
parent8f6e8c5358be3ceaed405cc4e10d0ae3f7bddc2f (diff)
Use uuid as main identifier for accounts
Diffstat (limited to 'src/gui/accountmanager.h')
-rw-r--r--src/gui/accountmanager.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/accountmanager.h b/src/gui/accountmanager.h
index b1bd27db5..e7a77f5f9 100644
--- a/src/gui/accountmanager.h
+++ b/src/gui/accountmanager.h
@@ -55,15 +55,20 @@ public:
void shutdown();
/**
- * Return a list of all accounts.
- * (this is a list of QSharedPointer for internal reasons, one should normally not keep a copy of them)
+ * Return a map of all accounts.
+ * (this is a map of QSharedPointer for internal reasons, one should normally not keep a copy of them)
*/
- const QList<AccountStatePtr> &accounts() { return _accounts; }
+ const QMap<QUuid, AccountStatePtr> &accounts() { return _accounts; }
/**
* Return the account state pointer for an account identified by its display name
*/
- AccountStatePtr account(const QString &name);
+ Q_DECL_DEPRECATED_X("Please use the uuid to specify the account") AccountStatePtr account(const QString &name);
+
+ /**
+ * Return the account state pointer for an account identified by its display name
+ */
+ AccountStatePtr account(const QUuid uuid);
/**
* Delete the AccountState
@@ -110,7 +115,7 @@ Q_SIGNALS:
private:
AccountManager() {}
- QList<AccountStatePtr> _accounts;
+ QMap<QUuid, AccountStatePtr> _accounts;
/// Account ids from settings that weren't read
QSet<QString> _additionalBlockedAccountIds;
};