diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-03 12:19:25 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-09 11:54:38 +0900 |
commit | 986fc27e451b21cdd118e74da9e9ff22e275ef75 (patch) | |
tree | 18895750e768cb773ec754176242bf947bbfc558 /jobs/mediathumbnailjob.cpp | |
parent | f951ab8a931c68f61b9710a540b2c971bbf502ca (diff) | |
download | libquotient-986fc27e451b21cdd118e74da9e9ff22e275ef75.tar.gz libquotient-986fc27e451b21cdd118e74da9e9ff22e275ef75.zip |
BaseJob, MediaThumbnailJob: Support request and response headers
Enable specifying headers in the request and checking/using headers in the response.
Diffstat (limited to 'jobs/mediathumbnailjob.cpp')
-rw-r--r-- | jobs/mediathumbnailjob.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jobs/mediathumbnailjob.cpp b/jobs/mediathumbnailjob.cpp index c0d67a63..9337549e 100644 --- a/jobs/mediathumbnailjob.cpp +++ b/jobs/mediathumbnailjob.cpp @@ -17,8 +17,8 @@ */ #include "mediathumbnailjob.h" -#include "util.h" +#include <QtNetwork/QNetworkReply> #include <QtCore/QDebug> using namespace QMatrixClient; @@ -47,9 +47,9 @@ QImage MediaThumbnailJob::scaledThumbnail(QSize toSize) const Qt::KeepAspectRatio, Qt::SmoothTransformation); } -BaseJob::Status MediaThumbnailJob::parseReply(QByteArray data) +BaseJob::Status MediaThumbnailJob::parseReply(QNetworkReply* reply) { - if( !_thumbnail.loadFromData(data) ) + if( !_thumbnail.loadFromData(reply->readAll()) ) { qCDebug(JOBS) << "MediaThumbnailJob: could not read image data"; } |