aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/user_identifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/user_identifier.cpp')
-rw-r--r--lib/csapi/definitions/user_identifier.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/csapi/definitions/user_identifier.cpp b/lib/csapi/definitions/user_identifier.cpp
index 3d3acaba..80a6d450 100644
--- a/lib/csapi/definitions/user_identifier.cpp
+++ b/lib/csapi/definitions/user_identifier.cpp
@@ -8,19 +8,18 @@ using namespace QMatrixClient;
QJsonObject QMatrixClient::toJson(const UserIdentifier& pod)
{
- QJsonObject _json = toJson(pod.additionalProperties);
- addParam<>(_json, QStringLiteral("type"), pod.type);
- return _json;
+ QJsonObject jo = toJson(pod.additionalProperties);
+ addParam<>(jo, QStringLiteral("type"), pod.type);
+ return jo;
}
-UserIdentifier FromJson<UserIdentifier>::operator()(const QJsonValue& jv)
+UserIdentifier FromJsonObject<UserIdentifier>::operator()(QJsonObject jo) const
{
- auto _json = jv.toObject();
UserIdentifier result;
result.type =
- fromJson<QString>(_json.take("type"_ls));
-
- result.additionalProperties = fromJson<QVariantHash>(_json);
+ fromJson<QString>(jo.take("type"_ls));
+
+ result.additionalProperties = fromJson<QVariantHash>(jo);
return result;
}