diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-10-14 10:06:44 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2016-10-14 10:06:44 +0900 |
commit | 24deeda0fe95fd352b823b48a3bc2e660f6a261d (patch) | |
tree | 712be9dc1f146105c5569dfac65367381f260793 /connection.cpp | |
parent | 45f38a1d6687d1ceaca87a6d6d94ac2515debb02 (diff) | |
download | libquotient-24deeda0fe95fd352b823b48a3bc2e660f6a261d.tar.gz libquotient-24deeda0fe95fd352b823b48a3bc2e660f6a261d.zip |
MediaThumbnailJob: Use QSize instead of two separate int's for size
Connection::getThumbnail() is now overloaded to provide compatibility with the previous interface.
Diffstat (limited to 'connection.cpp')
-rw-r--r-- | connection.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/connection.cpp b/connection.cpp index bc6d1f26..ec251500 100644 --- a/connection.cpp +++ b/connection.cpp @@ -27,7 +27,6 @@ #include "jobs/postreceiptjob.h" #include "jobs/joinroomjob.h" #include "jobs/leaveroomjob.h" -#include "jobs/roommembersjob.h" #include "jobs/roommessagesjob.h" #include "jobs/syncjob.h" #include "jobs/mediathumbnailjob.h" @@ -234,13 +233,18 @@ RoomMessagesJob* Connection::getMessages(Room* room, QString from) return job; } -MediaThumbnailJob* Connection::getThumbnail(QUrl url, int requestedWidth, int requestedHeight) +MediaThumbnailJob* Connection::getThumbnail(QUrl url, QSize requestedSize) { - MediaThumbnailJob* job = new MediaThumbnailJob(d->data, url, requestedWidth, requestedHeight); + MediaThumbnailJob* job = new MediaThumbnailJob(d->data, url, requestedSize); job->start(); return job; } +MediaThumbnailJob* Connection::getThumbnail(QUrl url, int requestedWidth, int requestedHeight) +{ + return getThumbnail(url, QSize(requestedWidth, requestedHeight)); +} + QUrl Connection::homeserver() const { return d->data->baseUrl(); |