aboutsummaryrefslogtreecommitdiff
path: root/jobs/roommessagesjob.cpp
diff options
context:
space:
mode:
authorKitsuneRal <KitsuneRal@users.noreply.github.com>2016-05-26 10:49:38 +0900
committerKitsuneRal <KitsuneRal@users.noreply.github.com>2016-05-26 10:49:38 +0900
commit408853a4f327978c990cd65b071e7c6496a0b95c (patch)
tree2487f1432c45829b152e7481077ad0fb08748aa6 /jobs/roommessagesjob.cpp
parent1cd8802c73ee3c0cc0095f8be30a9bbf3442c3ca (diff)
parentfab6c26770827ce2b8ed8f5d06b3677b75a19cec (diff)
downloadlibquotient-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.cpp9
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
+}