diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-07-11 10:15:09 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-07-11 11:27:16 +0200 |
commit | e2ea64c603b1e4b2184e363ee0d0a13fa0e286a0 (patch) | |
tree | 7d94ed526b95d08fa44c87785e9c2afddedcaf72 | |
parent | 267219c955b938483c3d113e455c4abd96ef8ce6 (diff) | |
download | libquotient-e2ea64c603b1e4b2184e363ee0d0a13fa0e286a0.tar.gz libquotient-e2ea64c603b1e4b2184e363ee0d0a13fa0e286a0.zip |
Add QUOTIENT_API to RoomStateView
Fixing link errors at non-template RoomStateView::get() when building
with libQuotient as a shared object. There's also a test in quotest.cpp
now to cover that case.
-rw-r--r-- | lib/roomstateview.h | 3 | ||||
-rw-r--r-- | quotest/quotest.cpp | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/roomstateview.h b/lib/roomstateview.h index cab69ae3..29cce00e 100644 --- a/lib/roomstateview.h +++ b/lib/roomstateview.h @@ -11,7 +11,8 @@ namespace Quotient { class Room; -class RoomStateView : private QHash<StateEventKey, const StateEventBase*> { +class QUOTIENT_API RoomStateView + : private QHash<StateEventKey, const StateEventBase*> { Q_GADGET public: const QHash<StateEventKey, const StateEventBase*>& events() const diff --git a/quotest/quotest.cpp b/quotest/quotest.cpp index 6bcd71cd..90a5a69b 100644 --- a/quotest/quotest.cpp +++ b/quotest/quotest.cpp @@ -588,6 +588,14 @@ TEST_IMPL(changeName) if (!rme->newDisplayName() || *rme->newDisplayName() != newName) FAIL_TEST(); + // State events coming in the timeline are first + // processed to change the room state and then as + // timeline messages; aboutToAddNewMessages is triggered + // when the state is already updated, so check that + if (targetRoom->currentState().get<RoomMemberEvent>( + localUser->id()) + != rme) + FAIL_TEST(); clog << "Member rename successful, renaming the account" << endl; const auto newN = newName.mid(0, 5); |