aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roommemberevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/roommemberevent.cpp')
-rw-r--r--lib/events/roommemberevent.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp
index b4770224..55da5809 100644
--- a/lib/events/roommemberevent.cpp
+++ b/lib/events/roommemberevent.cpp
@@ -43,19 +43,18 @@ MemberEventContent::MemberEventContent(const QJsonObject& json)
displayName = sanitized(*displayName);
}
-void MemberEventContent::fillJson(QJsonObject* o) const
+void MemberEventContent::fillJson(QJsonObject& o) const
{
- Q_ASSERT(o);
if (membership != Membership::Invalid)
- o->insert(QStringLiteral("membership"),
+ o.insert(QStringLiteral("membership"),
MembershipStrings[qCountTrailingZeroBits(
std::underlying_type_t<Membership>(membership))]);
if (displayName)
- o->insert(QStringLiteral("displayname"), *displayName);
+ o.insert(QStringLiteral("displayname"), *displayName);
if (avatarUrl && avatarUrl->isValid())
- o->insert(QStringLiteral("avatar_url"), avatarUrl->toString());
+ o.insert(QStringLiteral("avatar_url"), avatarUrl->toString());
if (!reason.isEmpty())
- o->insert(QStringLiteral("reason"), reason);
+ o.insert(QStringLiteral("reason"), reason);
}
bool RoomMemberEvent::changesMembership() const