aboutsummaryrefslogtreecommitdiff
path: root/jobs/mediathumbnailjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/mediathumbnailjob.cpp')
-rw-r--r--jobs/mediathumbnailjob.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/jobs/mediathumbnailjob.cpp b/jobs/mediathumbnailjob.cpp
index 261978ec..dda1cdb4 100644
--- a/jobs/mediathumbnailjob.cpp
+++ b/jobs/mediathumbnailjob.cpp
@@ -52,10 +52,12 @@ QImage MediaThumbnailJob::scaledThumbnail(QSize toSize) const
BaseJob::Status MediaThumbnailJob::parseReply(QNetworkReply* reply)
{
- GetContentThumbnailJob::parseReply(reply);
- if( !_thumbnail.loadFromData(content()->readAll()) )
- {
- qCDebug(JOBS) << "MediaThumbnailJob: could not read image data";
- }
- return Success;
+ auto result = GetContentThumbnailJob::parseReply(reply);
+ if (!result.good())
+ return result;
+
+ if( _thumbnail.loadFromData(content()->readAll()) )
+ return Success;
+
+ return { IncorrectResponseError, "Could not read image data" };
}