From: Camila Date: Tue, 30 Mar 2021 10:53:47 +0000 (+0200) Subject: Remove const and reference of base types. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~273^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=98cfc362f72584774f575eace58dc70e65695e32;p=nextcloud-desktop.git Remove const and reference of base types. Signed-off-by: Camila --- diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp index ac5a21c98..e7689f2e8 100644 --- a/src/gui/accountstate.cpp +++ b/src/gui/accountstate.cpp @@ -227,7 +227,7 @@ bool AccountState::isDesktopNotificationsAllowed() const return _isDesktopNotificationsAllowed; } -void AccountState::setDesktopNotificationsAllowed(const bool isAllowed) +void AccountState::setDesktopNotificationsAllowed(bool isAllowed) { _isDesktopNotificationsAllowed = isAllowed; } diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h index 59966f131..f0d1a2f99 100644 --- a/src/gui/accountstate.h +++ b/src/gui/accountstate.h @@ -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) */ diff --git a/src/gui/tray/NotificationHandler.cpp b/src/gui/tray/NotificationHandler.cpp index 46700ec1e..d97feed1c 100644 --- a/src/gui/tray/NotificationHandler.cpp +++ b/src/gui/tray/NotificationHandler.cpp @@ -64,7 +64,7 @@ void ServerNotificationHandler::slotEtagResponseHeaderReceived(const QByteArray } } -void ServerNotificationHandler::slotAllowDesktopNotificationsChanged(const bool isAllowed) +void ServerNotificationHandler::slotAllowDesktopNotificationsChanged(bool isAllowed) { auto *account = qvariant_cast(sender()->property(propertyAccountStateC)); if (account != nullptr) { diff --git a/src/gui/tray/NotificationHandler.h b/src/gui/tray/NotificationHandler.h index 61fbb51ec..5bc4692f5 100644 --- a/src/gui/tray/NotificationHandler.h +++ b/src/gui/tray/NotificationHandler.h @@ -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 _notificationJob; diff --git a/src/gui/tray/UserModel.cpp b/src/gui/tray/UserModel.cpp index 89345c932..df40e25d9 100644 --- a/src/gui/tray/UserModel.cpp +++ b/src/gui/tray/UserModel.cpp @@ -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 {}; diff --git a/src/gui/tray/UserModel.h b/src/gui/tray/UserModel.h index 527dd1949..60c890b53 100644 --- a/src/gui/tray/UserModel.h +++ b/src/gui/tray/UserModel.h @@ -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); diff --git a/src/gui/userstatus.cpp b/src/gui/userstatus.cpp index dc6866889..8d7eb92d9 100644 --- a/src/gui/userstatus.cpp +++ b/src/gui/userstatus.cpp @@ -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 { diff --git a/src/gui/userstatus.h b/src/gui/userstatus.h index ef35eda51..45e023d6a 100644 --- a/src/gui/userstatus.h +++ b/src/gui/userstatus.h @@ -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(); diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h index 0fb002925..1b0e212d4 100644 --- a/src/libsync/networkjobs.h +++ b/src/libsync/networkjobs.h @@ -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;