diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-09-29 18:20:54 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-09-29 23:35:54 +0900 |
commit | 508f4362b7b5e1863153cca6fe6756adedfa33ee (patch) | |
tree | 39fa11759b65e1ff8570ac58c1482d908e758782 /lib/user.cpp | |
parent | 7802bcb4dd44c7523cbc687b52dd2e65b900c636 (diff) | |
download | libquotient-508f4362b7b5e1863153cca6fe6756adedfa33ee.tar.gz libquotient-508f4362b7b5e1863153cca6fe6756adedfa33ee.zip |
Connection: allRooms(), rooms(), roomsCount(); deprecate roomMap()
Closes #354.
Diffstat (limited to 'lib/user.cpp')
-rw-r--r-- | lib/user.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/user.cpp b/lib/user.cpp index 641f6a6b..67cd1117 100644 --- a/lib/user.cpp +++ b/lib/user.cpp @@ -111,8 +111,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); @@ -176,8 +175,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); |