From 844d3362022d0278b07e1232460c1662e4fb61d2 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 27 Jul 2016 14:54:43 +0900 Subject: Introduce Status class + BaseJob::{checkReply,parseReply,parseJson} now return it This better fixes the contract for derived job classes and simplifies error reporting. Methods error() and errorString() are kept for back-compatibility; status() returns a combination of them, conveniently packed into a Status object. For a quick status check, Status::good() is provided. --- jobs/mediathumbnailjob.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'jobs/mediathumbnailjob.cpp') diff --git a/jobs/mediathumbnailjob.cpp b/jobs/mediathumbnailjob.cpp index 3f5f9ebf..1e434fbc 100644 --- a/jobs/mediathumbnailjob.cpp +++ b/jobs/mediathumbnailjob.cpp @@ -70,11 +70,11 @@ QUrlQuery MediaThumbnailJob::query() const return query; } -void MediaThumbnailJob::parseReply(QByteArray data) +BaseJob::Status MediaThumbnailJob::parseReply(QByteArray data) { if( !d->thumbnail.loadFromData(data) ) { qDebug() << "MediaThumbnailJob: could not read image data"; } - emitResult(); + return Success; } -- cgit v1.2.3