aboutsummaryrefslogtreecommitdiff
path: root/jobs/roommessagesjob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-16 14:10:08 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-16 14:10:08 +0900
commit491e392af73be3ebfd928e80efc0514fd43b8e87 (patch)
treeb129a00585a19764ef4092fe381c56c4658cd478 /jobs/roommessagesjob.cpp
parentf12e09ea1b45be1a96533aa83f6227940c70d548 (diff)
downloadlibquotient-491e392af73be3ebfd928e80efc0514fd43b8e87.tar.gz
libquotient-491e392af73be3ebfd928e80efc0514fd43b8e87.zip
Simplify code that loads events from JSON arrays
Diffstat (limited to 'jobs/roommessagesjob.cpp')
-rw-r--r--jobs/roommessagesjob.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/jobs/roommessagesjob.cpp b/jobs/roommessagesjob.cpp
index 078c692a..c527cc71 100644
--- a/jobs/roommessagesjob.cpp
+++ b/jobs/roommessagesjob.cpp
@@ -58,8 +58,8 @@ QString RoomMessagesJob::end() const
BaseJob::Status RoomMessagesJob::parseJson(const QJsonDocument& data)
{
- QJsonObject obj = data.object();
- d->events.assign(makeEvents<RoomEvent>(obj.value("chunk").toArray()));
+ const auto obj = data.object();
+ d->events.fromJson(obj, "chunk");
d->end = obj.value("end").toString();
return Success;
}