aboutsummaryrefslogtreecommitdiff
path: root/jobs/roommembersjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/roommembersjob.cpp')
-rw-r--r--jobs/roommembersjob.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/jobs/roommembersjob.cpp b/jobs/roommembersjob.cpp
index c16ba481..7fc44c63 100644
--- a/jobs/roommembersjob.cpp
+++ b/jobs/roommembersjob.cpp
@@ -20,6 +20,7 @@
#include <QtCore/QJsonObject>
#include <QtCore/QJsonArray>
+#include <QtCore/QDebug>
#include "../room.h"
#include "../state.h"
@@ -55,10 +56,9 @@ QString RoomMembersJob::apiPath() const
return QString("_matrix/client/r0/rooms/%1/members").arg(d->room->id());
}
-void RoomMembersJob::parseJson(const QJsonDocument& data)
+BaseJob::Status RoomMembersJob::parseJson(const QJsonDocument& data)
{
- QJsonObject obj = data.object();
- QJsonArray chunk = obj.value("chunk").toArray();
+ QJsonArray chunk = data.object().value("chunk").toArray();
for( const QJsonValue& val : chunk )
{
State* state = State::fromJson(val.toObject());
@@ -66,5 +66,5 @@ void RoomMembersJob::parseJson(const QJsonDocument& data)
d->states.append(state);
}
qDebug() << "States: " << d->states.count();
- emitResult();
+ return Success;
}