From 8ecbb39dc6303fcf3ae36ad033d7e90ea29b9003 Mon Sep 17 00:00:00 2001 From: Loren Burkholder <55629213+LorenDB@users.noreply.github.com> Date: Mon, 3 Oct 2022 17:57:30 -0400 Subject: cppcheck stuff (#1200) * cppcheck stuff * Update src/ui/RoomSettings.cpp Co-authored-by: DeepBlueV7.X * Update src/ui/RoomSettings.cpp Co-authored-by: DeepBlueV7.X * Fix linting Co-authored-by: DeepBlueV7.X --- src/ui/UserProfile.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/ui/UserProfile.cpp') diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp index bd02b308..a3bc87de 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp @@ -21,18 +21,17 @@ #include "timeline/TimelineViewManager.h" #include "ui/UIA.h" -UserProfile::UserProfile(QString roomid, - QString userid, +UserProfile::UserProfile(const QString &roomid, + const QString &userid, TimelineViewManager *manager_, TimelineModel *parent) : QObject(parent) , roomid_(roomid) , userid_(userid) + , globalAvatarUrl{QLatin1String("")} , manager(manager_) , model(parent) { - globalAvatarUrl = QLatin1String(""); - connect(this, &UserProfile::globalUsernameRetrieved, this, @@ -325,7 +324,7 @@ UserProfile::startChat() } void -UserProfile::changeUsername(QString username) +UserProfile::changeUsername(const QString &username) { if (isGlobalUserProfile()) { // change global @@ -349,7 +348,7 @@ UserProfile::changeUsername(QString username) } void -UserProfile::changeDeviceName(QString deviceID, QString deviceName) +UserProfile::changeDeviceName(const QString &deviceID, const QString &deviceName) { http::client()->set_device_name( deviceID.toStdString(), deviceName.toStdString(), [this](mtx::http::RequestErr err) { @@ -372,7 +371,7 @@ UserProfile::verify(QString device) } void -UserProfile::unverify(QString device) +UserProfile::unverify(const QString &device) { cache::markDeviceUnverified(userid_.toStdString(), device.toStdString()); } -- cgit 1.5.1