summary refs log tree commit diff
path: root/src/timeline/RoomlistModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-29 04:28:08 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-29 04:52:52 +0100
commitd8ead9573b6fd45e386d54b9aaec4e1c335b10ec (patch)
tree514d00ee26e67fc8bfeff403858e7d4ef276e6e3 /src/timeline/RoomlistModel.cpp
parentuse more literals (diff)
downloadnheko-d8ead9573b6fd45e386d54b9aaec4e1c335b10ec.tar.xz
Reduce allocations using QStringLiteral
Diffstat (limited to 'src/timeline/RoomlistModel.cpp')
-rw-r--r--src/timeline/RoomlistModel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp
index 6c9593ee..0757d27e 100644
--- a/src/timeline/RoomlistModel.cpp
+++ b/src/timeline/RoomlistModel.cpp
@@ -98,7 +98,7 @@ RoomlistModel::data(const QModelIndex &index, int role) const
         } else if (role == Roles::IsDirect) {
             return directChatToUser.count(roomid) > 0;
         } else if (role == Roles::DirectChatOtherUserId) {
-            return directChatToUser.count(roomid) ? directChatToUser.at(roomid).front() : "";
+            return directChatToUser.count(roomid) ? directChatToUser.at(roomid).front() : QLatin1String("");
         }
 
         if (models.contains(roomid)) {
@@ -833,7 +833,7 @@ FilteredRoomlistModel::updateHiddenTagsAndSpaces()
             hiddenTags.push_back(t.mid(4));
         else if (t.startsWith(u"space:"))
             hiddenSpaces.push_back(t.mid(6));
-        else if (t == "dm")
+        else if (t == QLatin1String("dm"))
             hideDMs = true;
     }