diff options
author | Claudio Cambra <claudio.cambra@gmail.com> | 2022-07-08 18:44:50 +0300 |
---|---|---|
committer | Matthieu Gallien <matthieu_gallien@yahoo.fr> | 2022-07-15 16:01:48 +0300 |
commit | 6872e1a75b15a9fe1d4a00b76c131b8705275ac0 (patch) | |
tree | 64118d2e4ab68f8bc3e0aa82482563a838847f27 /src/gui/tray/usermodel.cpp | |
parent | f4744eb682787e74aa4c233fde734f90430ad68b (diff) |
Take ints by value rather than reference in UserModel methods
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
Diffstat (limited to 'src/gui/tray/usermodel.cpp')
-rw-r--r-- | src/gui/tray/usermodel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/tray/usermodel.cpp b/src/gui/tray/usermodel.cpp index 782de47a1..566d93cd0 100644 --- a/src/gui/tray/usermodel.cpp +++ b/src/gui/tray/usermodel.cpp @@ -905,7 +905,7 @@ Q_INVOKABLE int UserModel::currentUserId() const return _currentUserId; } -Q_INVOKABLE bool UserModel::isUserConnected(const int &id) +Q_INVOKABLE bool UserModel::isUserConnected(const int id) { if (id < 0 || id >= _users.size()) return false; @@ -913,7 +913,7 @@ Q_INVOKABLE bool UserModel::isUserConnected(const int &id) return _users[id]->isConnected(); } -QImage UserModel::avatarById(const int &id) +QImage UserModel::avatarById(const int id) { if (id < 0 || id >= _users.size()) return {}; @@ -1014,7 +1014,7 @@ Q_INVOKABLE void UserModel::openCurrentAccountServer() QDesktopServices::openUrl(url); } -Q_INVOKABLE void UserModel::switchCurrentUser(const int &id) +Q_INVOKABLE void UserModel::switchCurrentUser(const int id) { if (_currentUserId < 0 || _currentUserId >= _users.size()) return; @@ -1025,7 +1025,7 @@ Q_INVOKABLE void UserModel::switchCurrentUser(const int &id) emit newUserSelected(); } -Q_INVOKABLE void UserModel::login(const int &id) +Q_INVOKABLE void UserModel::login(const int id) { if (id < 0 || id >= _users.size()) return; @@ -1033,7 +1033,7 @@ Q_INVOKABLE void UserModel::login(const int &id) _users[id]->login(); } -Q_INVOKABLE void UserModel::logout(const int &id) +Q_INVOKABLE void UserModel::logout(const int id) { if (id < 0 || id >= _users.size()) return; @@ -1041,7 +1041,7 @@ Q_INVOKABLE void UserModel::logout(const int &id) _users[id]->logout(); } -Q_INVOKABLE void UserModel::removeAccount(const int &id) +Q_INVOKABLE void UserModel::removeAccount(const int id) { if (id < 0 || id >= _users.size()) return; |