aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/accountdataevents.h4
-rw-r--r--lib/events/eventloader.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h
index 27f6c77c..792ea7f7 100644
--- a/lib/events/accountdataevents.h
+++ b/lib/events/accountdataevents.h
@@ -36,11 +36,11 @@ namespace QMatrixClient
order_type order;
TagRecord (order_type order = none) : order(order) { }
- explicit TagRecord(const QJsonValue& jv)
+ explicit TagRecord(const QJsonObject& jo)
{
// Parse a float both from JSON double and JSON string because
// libqmatrixclient previously used to use strings to store order.
- const auto orderJv = jv.toObject().value("order"_ls);
+ const auto orderJv = jo.value("order"_ls);
if (orderJv.isDouble())
order = fromJson<float>(orderJv);
else if (orderJv.isString())
diff --git a/lib/events/eventloader.h b/lib/events/eventloader.h
index ea261cac..3ee9a181 100644
--- a/lib/events/eventloader.h
+++ b/lib/events/eventloader.h
@@ -58,11 +58,11 @@ namespace QMatrixClient {
matrixType);
}
- template <typename EventT> struct FromJson<event_ptr_tt<EventT>>
+ template <typename EventT> struct FromJsonObject<event_ptr_tt<EventT>>
{
- auto operator()(const QJsonValue& jv) const
+ auto operator()(const QJsonObject& jo) const
{
- return loadEvent<EventT>(jv.toObject());
+ return loadEvent<EventT>(jo);
}
};
} // namespace QMatrixClient