diff options
Diffstat (limited to 'jobs/mediathumbnailjob.cpp')
-rw-r--r-- | jobs/mediathumbnailjob.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/jobs/mediathumbnailjob.cpp b/jobs/mediathumbnailjob.cpp index 9579f6b2..5945493a 100644 --- a/jobs/mediathumbnailjob.cpp +++ b/jobs/mediathumbnailjob.cpp @@ -23,10 +23,11 @@ using namespace QMatrixClient; -MediaThumbnailJob::MediaThumbnailJob(const ConnectionData* data, QUrl url, QSize requestedSize, +MediaThumbnailJob::MediaThumbnailJob(QUrl url, QSize requestedSize, ThumbnailType thumbnailType) - : BaseJob(data, HttpVerb::Get, "MediaThumbnailJob", - QString("/_matrix/media/v1/thumbnail/%1%2").arg(url.host(), url.path()), + : BaseJob(HttpVerb::Get, "MediaThumbnailJob", + QStringLiteral("/_matrix/media/v1/thumbnail/%1%2") + .arg(url.host(), url.path()), Query( { { "width", QString::number(requestedSize.width()) } , { "height", QString::number(requestedSize.height()) } @@ -35,12 +36,12 @@ MediaThumbnailJob::MediaThumbnailJob(const ConnectionData* data, QUrl url, QSize })) { } -QPixmap MediaThumbnailJob::thumbnail() +QPixmap MediaThumbnailJob::thumbnail() const { return pixmap; } -QPixmap MediaThumbnailJob::scaledThumbnail(QSize toSize) +QPixmap MediaThumbnailJob::scaledThumbnail(QSize toSize) const { return pixmap.scaled(toSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); } |