aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-04 13:28:09 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-08-04 13:28:09 +0200
commit3648c6a40c585e718bcfc0068cfa431e46f24a52 (patch)
tree98b925285665f09213163c223c5c40af96ddb4eb /lib/jobs
parent623212f538123606b3c27849c84f833d45ce9f02 (diff)
downloadlibquotient-3648c6a40c585e718bcfc0068cfa431e46f24a52.tar.gz
libquotient-3648c6a40c585e718bcfc0068cfa431e46f24a52.zip
Cleanup around [BaseJob::]IncorrectResponse[Error]
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.cpp5
-rw-r--r--lib/jobs/mediathumbnailjob.cpp3
-rw-r--r--lib/jobs/syncjob.cpp4
3 files changed, 5 insertions, 7 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index 465287c6..d6d48d2f 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -401,9 +401,8 @@ BaseJob::Status BaseJob::Private::parseJson()
{
QJsonParseError error { 0, QJsonParseError::MissingObject };
jsonResponse = QJsonDocument::fromJson(rawResponse, &error);
- return { error.error == QJsonParseError::NoError
- ? BaseJob::NoError
- : BaseJob::IncorrectResponse,
+ return { error.error == QJsonParseError::NoError ? NoError
+ : IncorrectResponse,
error.errorString() };
}
diff --git a/lib/jobs/mediathumbnailjob.cpp b/lib/jobs/mediathumbnailjob.cpp
index 33f4236c..a69f00e9 100644
--- a/lib/jobs/mediathumbnailjob.cpp
+++ b/lib/jobs/mediathumbnailjob.cpp
@@ -53,6 +53,5 @@ BaseJob::Status MediaThumbnailJob::prepareResult()
if (_thumbnail.loadFromData(data()->readAll()))
return Success;
- return { IncorrectResponseError,
- QStringLiteral("Could not read image data") };
+ return { IncorrectResponse, QStringLiteral("Could not read image data") };
}
diff --git a/lib/jobs/syncjob.cpp b/lib/jobs/syncjob.cpp
index 6b8cfe4b..9087fe50 100644
--- a/lib/jobs/syncjob.cpp
+++ b/lib/jobs/syncjob.cpp
@@ -53,9 +53,9 @@ BaseJob::Status SyncJob::prepareResult()
{
d.parseJson(jsonData());
if (d.unresolvedRooms().isEmpty())
- return BaseJob::Success;
+ return Success;
qCCritical(MAIN).noquote() << "Incomplete sync response, missing rooms:"
<< d.unresolvedRooms().join(',');
- return BaseJob::IncorrectResponseError;
+ return IncorrectResponse;
}