aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}