diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-13 21:10:36 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-15 18:48:15 +0900 |
commit | cb3848c1e7fe09c2e778d38139c399b9f0484ce5 (patch) | |
tree | 2112a43641cd0622884e79f626a1c8a056885286 /user.cpp | |
parent | 5ad32f13b8a7a8552e2b6c56571bd8177b3fabb2 (diff) | |
download | libquotient-cb3848c1e7fe09c2e778d38139c399b9f0484ce5.tar.gz libquotient-cb3848c1e7fe09c2e778d38139c399b9f0484ce5.zip |
MediaThumbnailJob: get rid of useless pimpl; add scaledThumbnail()
Also use scaledThumbnail() in User::requestAvatar()
Diffstat (limited to 'user.cpp')
-rw-r--r-- | user.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -170,12 +170,11 @@ void User::requestAvatar() void User::Private::requestAvatar() { - MediaThumbnailJob* job = connection->getThumbnail(avatarUrl, requestedSize); + auto* job = connection->callApi<MediaThumbnailJob>(avatarUrl, requestedSize); connect( job, &MediaThumbnailJob::success, [=]() { avatarOngoingRequest = false; avatarValid = true; - avatar = job->thumbnail().scaled(requestedSize, - Qt::KeepAspectRatio, Qt::SmoothTransformation); + avatar = job->scaledThumbnail(requestedSize); scaledAvatars.clear(); emit q->avatarChanged(q); }); |