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.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp
index 76b003c2..3acce7cb 100644
--- a/lib/events/roommemberevent.cpp
+++ b/lib/events/roommemberevent.cpp
@@ -50,10 +50,10 @@ namespace QMatrixClient
}
MemberEventContent::MemberEventContent(const QJsonObject& json)
- : membership(fromJson<MembershipType>(json["membership"]))
- , isDirect(json["is_direct"].toBool())
- , displayName(json["displayname"].toString())
- , avatarUrl(json["avatar_url"].toString())
+ : membership(fromJson<MembershipType>(json["membership"_ls]))
+ , isDirect(json["is_direct"_ls].toBool())
+ , displayName(json["displayname"_ls].toString())
+ , avatarUrl(json["avatar_url"_ls].toString())
{ }
void MemberEventContent::fillJson(QJsonObject* o) const
@@ -62,8 +62,8 @@ void MemberEventContent::fillJson(QJsonObject* o) const
Q_ASSERT_X(membership != MembershipType::Undefined, __FUNCTION__,
"The key 'membership' must be explicit in MemberEventContent");
if (membership != MembershipType::Undefined)
- o->insert("membership", membershipStrings[membership]);
- o->insert("displayname", displayName);
+ o->insert(QStringLiteral("membership"), membershipStrings[membership]);
+ o->insert(QStringLiteral("displayname"), displayName);
if (avatarUrl.isValid())
- o->insert("avatar_url", avatarUrl.toString());
+ o->insert(QStringLiteral("avatar_url"), avatarUrl.toString());
}