aboutsummaryrefslogtreecommitdiff
path: root/jobs/roommembersjob.cpp
diff options
context:
space:
mode:
authorKitsuneRal <Kitsune-Ral@users.sf.net>2016-08-23 08:46:30 +0900
committerGitHub <noreply@github.com>2016-08-23 08:46:30 +0900
commitac0336ff600d8b978d3cdb68cd92b3425fe0b100 (patch)
tree4d48c6f13cfd5494696a3e270421b3ab63124f70 /jobs/roommembersjob.cpp
parentc2e38f28987b4fa273765b4234c6a57bdf75e446 (diff)
parentf6c623a27bcb5ec2fcc83930e500afb597a32a46 (diff)
downloadlibquotient-ac0336ff600d8b978d3cdb68cd92b3425fe0b100.tar.gz
libquotient-ac0336ff600d8b978d3cdb68cd92b3425fe0b100.zip
Merge pull request #15 from Fxrh/kitsune-dropped-kcoreaddons
Upon discussion with @Fxrh in #quaternion, this now comes in master,
Diffstat (limited to 'jobs/roommembersjob.cpp')
-rw-r--r--jobs/roommembersjob.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/jobs/roommembersjob.cpp b/jobs/roommembersjob.cpp
index 002be75b..7fc44c63 100644
--- a/jobs/roommembersjob.cpp
+++ b/jobs/roommembersjob.cpp
@@ -56,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());
@@ -67,5 +66,5 @@ void RoomMembersJob::parseJson(const QJsonDocument& data)
d->states.append(state);
}
qDebug() << "States: " << d->states.count();
- emitResult();
+ return Success;
}