summary refs log tree commit diff
path: root/src/ui/RoomSettings.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <55629213+LorenDB@users.noreply.github.com>2022-10-03 17:57:30 -0400
committerGitHub <noreply@github.com>2022-10-03 21:57:30 +0000
commit8ecbb39dc6303fcf3ae36ad033d7e90ea29b9003 (patch)
treeccbf44824e2a038254ce77ae3890d2d6d86b0a94 /src/ui/RoomSettings.cpp
parentMerge pull request #1202 from Nheko-Reborn/grammar (diff)
downloadnheko-8ecbb39dc6303fcf3ae36ad033d7e90ea29b9003.tar.xz
cppcheck stuff (#1200)
* cppcheck stuff

* Update src/ui/RoomSettings.cpp

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>

* Update src/ui/RoomSettings.cpp

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>

* Fix linting

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
Diffstat (limited to 'src/ui/RoomSettings.cpp')
-rw-r--r--src/ui/RoomSettings.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/RoomSettings.cpp b/src/ui/RoomSettings.cpp
index 9b81e777..546cda29 100644
--- a/src/ui/RoomSettings.cpp
+++ b/src/ui/RoomSettings.cpp
@@ -35,14 +35,14 @@ RoomSettings::RoomSettings(QString roomid, QObject *parent)
       "global",
       "override",
       roomid_.toStdString(),
-      [this](const mtx::pushrules::PushRule &rule, mtx::http::RequestErr &err) {
+      [this](const mtx::pushrules::PushRule &rule, mtx::http::RequestErr err) {
           if (err) {
               if (err->status_code == 404)
                   http::client()->get_pushrules(
                     "global",
                     "room",
                     roomid_.toStdString(),
-                    [this](const mtx::pushrules::PushRule &rule, mtx::http::RequestErr &err) {
+                    [this](const mtx::pushrules::PushRule &rule, mtx::http::RequestErr err) {
                         if (err) {
                             notifications_ = 2; // all messages
                             emit notificationsChanged();
@@ -424,7 +424,7 @@ RoomSettings::changeAccessRules(bool private_,
 }
 
 void
-RoomSettings::changeName(QString name)
+RoomSettings::changeName(const QString &name)
 {
     // Check if the values are changed from the originals.
     auto newName = name.trimmed().toStdString();
@@ -435,7 +435,7 @@ RoomSettings::changeName(QString name)
 
     using namespace mtx::events;
     auto proxy = std::make_shared<ThreadProxy>();
-    connect(proxy.get(), &ThreadProxy::nameEventSent, this, [this](QString newRoomName) {
+    connect(proxy.get(), &ThreadProxy::nameEventSent, this, [this](const QString &newRoomName) {
         this->info_.name = newRoomName.toStdString();
         emit roomNameChanged();
     });
@@ -458,7 +458,7 @@ RoomSettings::changeName(QString name)
 }
 
 void
-RoomSettings::changeTopic(QString topic)
+RoomSettings::changeTopic(const QString &topic)
 {
     // Check if the values are changed from the originals.
     auto newTopic = topic.trimmed().toStdString();
@@ -469,7 +469,7 @@ RoomSettings::changeTopic(QString topic)
 
     using namespace mtx::events;
     auto proxy = std::make_shared<ThreadProxy>();
-    connect(proxy.get(), &ThreadProxy::topicEventSent, this, [this](QString newRoomTopic) {
+    connect(proxy.get(), &ThreadProxy::topicEventSent, this, [this](const QString &newRoomTopic) {
         this->info_.topic = newRoomTopic.toStdString();
         emit roomTopicChanged();
     });