aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-26 08:19:29 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-28 15:08:31 +0200
commiteed5a6f127ec3bb1553ac629457f196d8893665a (patch)
tree215ae5fae5078494770af36998747fc806963ac2 /lib/room.h
parent000b57306afe450c21df3aa95313567614c34516 (diff)
downloadlibquotient-eed5a6f127ec3bb1553ac629457f196d8893665a.tar.gz
libquotient-eed5a6f127ec3bb1553ac629457f196d8893665a.zip
Room::usersAtEventId(): switch from QMultiHash to QHash of QSets
While slightly more complex for updating, this allows COW to kick in in the read accessor; using QSet instead of QList also provides better consistency guarantees. For QML both are converted to an Array-like collection since Qt 5.15; Qt 5.12 turns QSet<> in a QVariantList, according to the documentation, which is quite reasonable too.
Diffstat (limited to 'lib/room.h')
-rw-r--r--lib/room.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/room.h b/lib/room.h
index cdbfe58f..fa7b6e6d 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -364,7 +364,7 @@ public:
rev_iter_t readMarker(const User* user) const;
rev_iter_t readMarker() const;
QString readMarkerEventId() const;
- QList<User*> usersAtEventId(const QString& eventId);
+ QSet<User*> usersAtEventId(const QString& eventId);
/**
* \brief Mark the event with uptoEventId as read
*