diff options
author | KitsuneRal <Kitsune-Ral@users.sf.net> | 2016-08-23 08:46:30 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 08:46:30 +0900 |
commit | ac0336ff600d8b978d3cdb68cd92b3425fe0b100 (patch) | |
tree | 4d48c6f13cfd5494696a3e270421b3ab63124f70 /jobs/mediathumbnailjob.cpp | |
parent | c2e38f28987b4fa273765b4234c6a57bdf75e446 (diff) | |
parent | f6c623a27bcb5ec2fcc83930e500afb597a32a46 (diff) | |
download | libquotient-ac0336ff600d8b978d3cdb68cd92b3425fe0b100.tar.gz libquotient-ac0336ff600d8b978d3cdb68cd92b3425fe0b100.zip |
Merge pull request #15 from Fxrh/kitsune-dropped-kcoreaddons
Upon discussion with @Fxrh in #quaternion, this now comes in master,
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; } |