aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-09-29 22:22:49 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-09-29 22:22:49 +0900
commitb55334ac0fe89f780776bc4eab90ffe1ca3c57bb (patch)
tree1a45c0ccfec8f5f7ba37eb4385cdc7f61afa0c97 /lib/events
parentf5c2e47fa1ab84fdaffe03c30ba973d7dea5ac05 (diff)
parent1e6510790dab6b9141ae52993987b406399668cd (diff)
downloadlibquotient-b55334ac0fe89f780776bc4eab90ffe1ca3c57bb.tar.gz
libquotient-b55334ac0fe89f780776bc4eab90ffe1ca3c57bb.zip
Merge branch 'cs-api-0.4.0'
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