aboutsummaryrefslogtreecommitdiff
path: root/jobs/mediathumbnailjob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-03 12:19:25 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-03 12:19:25 +0900
commit0a688331ec0d9d9c592e8c542946dbd66d9c6b2f (patch)
tree96221cdf29a82c720c1bae381b50d529c3187c87 /jobs/mediathumbnailjob.cpp
parent04c53826b0694dee38010b2f5116db6cf2e9b221 (diff)
downloadlibquotient-0a688331ec0d9d9c592e8c542946dbd66d9c6b2f.tar.gz
libquotient-0a688331ec0d9d9c592e8c542946dbd66d9c6b2f.zip
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.cpp6
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";
}