aboutsummaryrefslogtreecommitdiff
path: root/jobs/mediathumbnailjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/mediathumbnailjob.cpp')
-rw-r--r--jobs/mediathumbnailjob.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/jobs/mediathumbnailjob.cpp b/jobs/mediathumbnailjob.cpp
index 8a5dc4ea..975a533d 100644
--- a/jobs/mediathumbnailjob.cpp
+++ b/jobs/mediathumbnailjob.cpp
@@ -27,19 +27,17 @@ class MediaThumbnailJob::Private
public:
QUrl url;
QPixmap thumbnail;
- int requestedHeight;
- int requestedWidth;
+ QSize requestedSize;
ThumbnailType thumbnailType;
};
-MediaThumbnailJob::MediaThumbnailJob(ConnectionData* data, QUrl url, int requestedWidth, int requestedHeight,
+MediaThumbnailJob::MediaThumbnailJob(ConnectionData* data, QUrl url, QSize requestedSize,
ThumbnailType thumbnailType)
: BaseJob(data, JobHttpType::GetJob, "MediaThumbnailJob")
, d(new Private)
{
d->url = url;
- d->requestedHeight = requestedHeight;
- d->requestedWidth = requestedWidth;
+ d->requestedSize = requestedSize;
d->thumbnailType = thumbnailType;
}
@@ -61,8 +59,8 @@ QString MediaThumbnailJob::apiPath() const
QUrlQuery MediaThumbnailJob::query() const
{
QUrlQuery query;
- query.addQueryItem("width", QString::number(d->requestedWidth));
- query.addQueryItem("height", QString::number(d->requestedHeight));
+ query.addQueryItem("width", QString::number(d->requestedSize.width()));
+ query.addQueryItem("height", QString::number(d->requestedSize.height()));
if( d->thumbnailType == ThumbnailType::Scale )
query.addQueryItem("method", "scale");
else