aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/wellknown/homeserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/wellknown/homeserver.cpp')
-rw-r--r--lib/csapi/definitions/wellknown/homeserver.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/csapi/definitions/wellknown/homeserver.cpp b/lib/csapi/definitions/wellknown/homeserver.cpp
index f1482ee4..0783f11b 100644
--- a/lib/csapi/definitions/wellknown/homeserver.cpp
+++ b/lib/csapi/definitions/wellknown/homeserver.cpp
@@ -6,19 +6,15 @@
using namespace QMatrixClient;
-QJsonObject QMatrixClient::toJson(const HomeserverInformation& pod)
+void JsonObjectConverter<HomeserverInformation>::dumpTo(
+ QJsonObject& jo, const HomeserverInformation& pod)
{
- QJsonObject jo;
addParam<>(jo, QStringLiteral("base_url"), pod.baseUrl);
- return jo;
}
-HomeserverInformation FromJsonObject<HomeserverInformation>::operator()(const QJsonObject& jo) const
+void JsonObjectConverter<HomeserverInformation>::fillFrom(
+ const QJsonObject& jo, HomeserverInformation& result)
{
- HomeserverInformation result;
- result.baseUrl =
- fromJson<QString>(jo.value("base_url"_ls));
-
- return result;
+ fromJson(jo.value("base_url"_ls), result.baseUrl);
}