aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index 535551cf..c51354a0 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -118,8 +118,7 @@ void User::Private::setNameForRoom(const Room* r, QString newName,
et.start();
}
- const auto& roomMap = connection->roomMap();
- for (auto* r1: roomMap)
+ for (auto* r1: connection->allRooms())
if (nameForRoom(r1) == mostUsedName)
otherNames.insert(mostUsedName, r1);
@@ -186,8 +185,7 @@ void User::Private::setAvatarForRoom(const Room* r, const QUrl& newUrl,
nextMostUsedIt = otherAvatars.end() - 1;
}
std::swap(mostUsedAvatar, *nextMostUsedIt);
- const auto& roomMap = connection->roomMap();
- for (const auto* r1: roomMap)
+ for (const auto* r1: connection->allRooms())
if (avatarUrlForRoom(r1) == nextMostUsedIt->url())
avatarsToRooms.insert(nextMostUsedIt->url(), r1);