From a3b9fe1ddd2d3b0a0cbb07ffc42317b30a1a3899 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 28 Dec 2017 11:26:59 +0900 Subject: Switch from QPixmap to QImage; add convenience avatar() overloads to Room and User The switch is necessary because MediaThumbnailJob is supposed to return something that can be worked on in non-GUI threads (as is the case of QML image providers), and QPixmap is not supposed for usage out of the main thread. --- avatar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'avatar.h') diff --git a/avatar.h b/avatar.h index e71fecd7..d8b4b206 100644 --- a/avatar.h +++ b/avatar.h @@ -36,7 +36,8 @@ namespace QMatrixClient using notifier_t = std::function; - QPixmap get(int w, int h, notifier_t notifier); + QImage get(int dimension, notifier_t notifier); + QImage get(int w, int h, notifier_t notifier); QUrl url() const; bool updateUrl(const QUrl& newUrl); -- cgit v1.2.3