aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/eventloader.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/events/eventloader.h b/lib/events/eventloader.h
index c7b82e8e..7dde9786 100644
--- a/lib/events/eventloader.h
+++ b/lib/events/eventloader.h
@@ -48,14 +48,11 @@ inline StateEventPtr loadStateEvent(const QString& matrixType,
}
template <typename EventT>
-struct JsonConverter<event_ptr_tt<EventT>> {
- static auto load(const QJsonValue& jv)
+struct JsonConverter<event_ptr_tt<EventT>>
+ : JsonObjectUnpacker<event_ptr_tt<EventT>> {
+ static auto load(const QJsonObject& jo)
{
- return loadEvent<EventT>(jv.toObject());
- }
- static auto load(const QJsonDocument& jd)
- {
- return loadEvent<EventT>(jd.object());
+ return loadEvent<EventT>(jo);
}
};
} // namespace Quotient