diff options
author | KitsuneRal <KitsuneRal@users.noreply.github.com> | 2016-05-26 10:49:38 +0900 |
---|---|---|
committer | KitsuneRal <KitsuneRal@users.noreply.github.com> | 2016-05-26 10:49:38 +0900 |
commit | 408853a4f327978c990cd65b071e7c6496a0b95c (patch) | |
tree | 2487f1432c45829b152e7481077ad0fb08748aa6 /jobs/roommessagesjob.cpp | |
parent | 1cd8802c73ee3c0cc0095f8be30a9bbf3442c3ca (diff) | |
parent | fab6c26770827ce2b8ed8f5d06b3677b75a19cec (diff) | |
download | libquotient-408853a4f327978c990cd65b071e7c6496a0b95c.tar.gz libquotient-408853a4f327978c990cd65b071e7c6496a0b95c.zip |
Merge pull request #7 from Fxrh/event-lists
Introducing EventList class + minor fix
Diffstat (limited to 'jobs/roommessagesjob.cpp')
-rw-r--r-- | jobs/roommessagesjob.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/jobs/roommessagesjob.cpp b/jobs/roommessagesjob.cpp index fc3f5f1e..5a97cc23 100644 --- a/jobs/roommessagesjob.cpp +++ b/jobs/roommessagesjob.cpp @@ -84,12 +84,7 @@ QUrlQuery RoomMessagesJob::query() void RoomMessagesJob::parseJson(const QJsonDocument& data) { QJsonObject obj = data.object(); - QJsonArray chunk = obj.value("chunk").toArray(); - for( const QJsonValue& val: chunk ) - { - Event* event = Event::fromJson(val.toObject()); - d->events.append(event); - } + d->events = eventListFromJson(obj.value("chunk").toArray()); d->end = obj.value("end").toString(); emitResult(); -}
\ No newline at end of file +} |