From cb3848c1e7fe09c2e778d38139c399b9f0484ce5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 13 Sep 2017 21:10:36 +0900 Subject: MediaThumbnailJob: get rid of useless pimpl; add scaledThumbnail() Also use scaledThumbnail() in User::requestAvatar() --- user.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'user.cpp') diff --git a/user.cpp b/user.cpp index 8d37eef6..f9f48539 100644 --- a/user.cpp +++ b/user.cpp @@ -170,12 +170,11 @@ void User::requestAvatar() void User::Private::requestAvatar() { - MediaThumbnailJob* job = connection->getThumbnail(avatarUrl, requestedSize); + auto* job = connection->callApi(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); }); -- cgit v1.2.3