diff options
Diffstat (limited to 'jobs/mediathumbnailjob.cpp')
-rw-r--r-- | jobs/mediathumbnailjob.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/jobs/mediathumbnailjob.cpp b/jobs/mediathumbnailjob.cpp index 48ed0ffb..1e434fbc 100644 --- a/jobs/mediathumbnailjob.cpp +++ b/jobs/mediathumbnailjob.cpp @@ -70,19 +70,11 @@ QUrlQuery MediaThumbnailJob::query() const return query; } -void MediaThumbnailJob::gotReply() +BaseJob::Status MediaThumbnailJob::parseReply(QByteArray data) { - if( networkReply()->error() != QNetworkReply::NoError ) - { - qDebug() << "NetworkError!!!"; - qDebug() << networkReply()->errorString(); - fail( NetworkError, networkReply()->errorString() ); - return; - } - - if( !d->thumbnail.loadFromData( networkReply()->readAll() ) ) + if( !d->thumbnail.loadFromData(data) ) { qDebug() << "MediaThumbnailJob: could not read image data"; } - emitResult(); + return Success; } |