From 2216c5f844e5227976f4b0a8208c6c7e834934ae Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 26 Mar 2020 22:49:06 +0100 Subject: Connection: allRooms(), rooms(), roomsCount(); deprecate roomMap() Backport of #354. --- lib/user.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/user.cpp') 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); -- cgit v1.2.3