diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-07-26 08:19:29 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-07-28 15:08:31 +0200 |
commit | eed5a6f127ec3bb1553ac629457f196d8893665a (patch) | |
tree | 215ae5fae5078494770af36998747fc806963ac2 /lib/room.h | |
parent | 000b57306afe450c21df3aa95313567614c34516 (diff) | |
download | libquotient-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 * |