Declare void setters and methods in accountmanager as slots
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 5 May 2023 02:36:43 +0000 (10:36 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 16 May 2023 13:23:43 +0000 (21:23 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/accountmanager.h

index a348b8df5e7e88efbcf6425119874c5812f402ef..8f853df8970e83168287b4904414e4d6a21d44d7 100644 (file)
@@ -38,11 +38,6 @@ public:
     static AccountManager *instance();
     ~AccountManager() override = default;
 
-    /**
-     * Saves the accounts to a given settings file
-     */
-    void save(bool saveCredentials = true);
-
     /**
      * Creates account objects from a given settings file.
      *
@@ -57,11 +52,6 @@ public:
      */
     AccountState *addAccount(const AccountPtr &newAccount);
 
-    /**
-     * remove all accounts
-     */
-    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)
@@ -79,11 +69,6 @@ public:
 
     [[nodiscard]] AccountStatePtr accountFromUserId(const QString &id) const;
 
-    /**
-     * Delete the AccountState
-     */
-    void deleteAccount(AccountState *account);
-
     /**
      * Creates an account and sets up some basic handlers.
      * Does *not* add the account to the account manager just yet.
@@ -103,6 +88,15 @@ public slots:
     /// Saves account state data, not including the account
     void saveAccountState(OCC::AccountState *a);
 
+    /// Saves the accounts to a given settings file
+    void save(bool saveCredentials = true);
+
+    /// Delete the AccountState
+    void deleteAccount(AccountState *account);
+
+    /// Remove all accounts
+    void shutdown();
+
 signals:
     void accountAdded(OCC::AccountState *account);
     void accountRemoved(OCC::AccountState *account);