Remove const and reference of base types.
authorCamila <hello@camila.codes>
Tue, 30 Mar 2021 10:53:47 +0000 (12:53 +0200)
committerallexzander (Rebase PR Action) <allexzander@users.noreply.github.com>
Thu, 8 Apr 2021 07:10:58 +0000 (07:10 +0000)
Signed-off-by: Camila <hello@camila.codes>
src/gui/accountstate.cpp
src/gui/accountstate.h
src/gui/tray/NotificationHandler.cpp
src/gui/tray/NotificationHandler.h
src/gui/tray/UserModel.cpp
src/gui/tray/UserModel.h
src/gui/userstatus.cpp
src/gui/userstatus.h
src/libsync/networkjobs.h

index ac5a21c98d3d8178faaa151dd67ec9c97c3438fe..e7689f2e83cbd69fb839b653c84ec6352df77b85 100644 (file)
@@ -227,7 +227,7 @@ bool AccountState::isDesktopNotificationsAllowed() const
     return _isDesktopNotificationsAllowed;
 }
 
-void AccountState::setDesktopNotificationsAllowed(const bool isAllowed)
+void AccountState::setDesktopNotificationsAllowed(bool isAllowed)
 {
     _isDesktopNotificationsAllowed = isAllowed;
 }
index 59966f1313181bc8f58db165f8164c04b770a1b9..f0d1a2f9979834b5fdb3824777031914604cc775 100644 (file)
@@ -182,7 +182,7 @@ public:
 
     /** Set desktop notifications status retrieved by the notificatons endpoint
     */
-    void setDesktopNotificationsAllowed(const bool isAllowed);
+    void setDesktopNotificationsAllowed(bool isAllowed);
 
     /** Fetch the user status (status, icon, message)
     */
index 46700ec1e23b8b75010f302c3843a93b488148a4..d97feed1cdb9c91ae1fa301968e942328d01c7dd 100644 (file)
@@ -64,7 +64,7 @@ void ServerNotificationHandler::slotEtagResponseHeaderReceived(const QByteArray
     }
 }
 
-void ServerNotificationHandler::slotAllowDesktopNotificationsChanged(const bool isAllowed)
+void ServerNotificationHandler::slotAllowDesktopNotificationsChanged(bool isAllowed)
 {
     auto *account = qvariant_cast<AccountState *>(sender()->property(propertyAccountStateC));
     if (account != nullptr) {
index 61fbb51ec5dfd2140858a3ecbca9c21df3040ad8..5bc4692f59bd5cfb66dd9f78ebb4bfa75b4a5913 100644 (file)
@@ -26,7 +26,7 @@ private slots:
     void slotNotificationsReceived(const QJsonDocument &json, int statusCode);
     void slotEtagResponseHeaderReceived(const QByteArray &value, int statusCode);
     void slotIconDownloaded(QByteArray iconData);
-    void slotAllowDesktopNotificationsChanged(const bool isAllowed);
+    void slotAllowDesktopNotificationsChanged(bool isAllowed);
 
 private:
     QPointer<JsonApiJob> _notificationJob;
index 89345c9328ab71e0b0a26e5d50132af38a9e3232..df40e25d92da10b0769dd384dc7799336e34ecb5 100644 (file)
@@ -698,7 +698,7 @@ Q_INVOKABLE bool UserModel::isUserConnected(const int &id)
     return _users[id]->isConnected();
 }
 
-Q_INVOKABLE QUrl UserModel::statusIcon(const int &id)
+Q_INVOKABLE QUrl UserModel::statusIcon(int id)
 {
     if (id < 0 || id >= _users.size()) {
         return {};
index 527dd19490c00cc681b2914512d1d9ed09fc378b..60c890b53769c36a615164de7ff083f4d95f20e5 100644 (file)
@@ -140,7 +140,7 @@ public:
     Q_INVOKABLE bool currentUserHasLocalFolder();
     int currentUserId() const;
     Q_INVOKABLE bool isUserConnected(const int &id);
-    Q_INVOKABLE QUrl statusIcon(const int &id);
+    Q_INVOKABLE QUrl statusIcon(int id);
     Q_INVOKABLE void switchCurrentUser(const int &id);
     Q_INVOKABLE void login(const int &id);
     Q_INVOKABLE void logout(const int &id);
index dc6866889e065f38b396b6021fb9070014b9b458..8d7eb92d98f986aee95b4aa30bc2008c3f9670b6 100644 (file)
@@ -53,7 +53,7 @@ void UserStatus::fetchUserStatus(AccountPtr account)
     _job->start();
 }
 
-void UserStatus::slotFetchUserStatusFinished(const QJsonDocument &json, const int statusCode)
+void UserStatus::slotFetchUserStatusFinished(const QJsonDocument &json, int statusCode)
 {
     const QJsonObject defaultValues
     {
index ef35eda5149601d6986c2837c8a993a1bf7b7b6f..45e023d6af7519fc39be0d68d175d0af01dfb1d5 100644 (file)
@@ -42,7 +42,7 @@ public:
     QUrl icon() const;
 
 private slots:
-    void slotFetchUserStatusFinished(const QJsonDocument &json, const int statusCode);
+    void slotFetchUserStatusFinished(const QJsonDocument &json, int statusCode);
 
 signals:
     void fetchUserStatusFinished();
index 0fb0029250db814eb0c6e26196cafb797b2de5b7..1b0e212d498c723305d0d5dba7a75ac2cf1a99b0 100644 (file)
@@ -425,7 +425,7 @@ signals:
      * @brief desktopNotificationStatusReceived - signal to report if notifications are allowed
      * @param status - set desktop notifications allowed status 
      */
-    void allowDesktopNotificationsChanged(const bool isAllowed);
+    void allowDesktopNotificationsChanged(bool isAllowed);
 
 private:
     QUrlQuery _additionalParams;