diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-08 17:44:42 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-08 17:44:42 +0900 |
commit | 3489b77bba1b9429925dfe9539c2a9e8137fc622 (patch) | |
tree | 59a7cb3bc7b25eee12a37c43db4c069b7c240464 /lib/events | |
parent | 39204f0099e5556eb46bed00f3b31413af860a45 (diff) | |
parent | 5ea115d6eb0b60dfd0c2be5fbe5e69615b133238 (diff) | |
download | libquotient-3489b77bba1b9429925dfe9539c2a9e8137fc622.tar.gz libquotient-3489b77bba1b9429925dfe9539c2a9e8137fc622.zip |
Merge branch 'kitsune-tweaks-fixes'
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/roommemberevent.h | 7 | ||||
-rw-r--r-- | lib/events/stateevent.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/events/roommemberevent.h b/lib/events/roommemberevent.h index db25d026..149d74f8 100644 --- a/lib/events/roommemberevent.h +++ b/lib/events/roommemberevent.h @@ -29,13 +29,10 @@ namespace QMatrixClient enum MembershipType : size_t { Invite = 0, Join, Knock, Leave, Ban, Undefined }; - explicit MemberEventContent(MembershipType mt = MembershipType::Join) + explicit MemberEventContent(MembershipType mt = Join) : membership(mt) { } explicit MemberEventContent(const QJsonObject& json); - explicit MemberEventContent(const QJsonValue& jv) - : MemberEventContent(jv.toObject()) - { } MembershipType membership; bool isDirect = false; @@ -60,7 +57,7 @@ namespace QMatrixClient : StateEvent(typeId(), obj) { } RoomMemberEvent(MemberEventContent&& c) - : StateEvent(typeId(), matrixTypeId(), c.toJson()) + : StateEvent(typeId(), matrixTypeId(), c) { } // This is a special constructor enabling RoomMemberEvent to be diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h index d4a7e8b3..d82de7e1 100644 --- a/lib/events/stateevent.h +++ b/lib/events/stateevent.h @@ -95,7 +95,7 @@ namespace QMatrixClient { QString prevSenderId() const { return _prev ? _prev->senderId : QString(); } - protected: + private: ContentT _content; std::unique_ptr<Prev<ContentT>> _prev; }; |