summary refs log tree commit diff
path: root/src/MxcImageProvider.h
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-09-17 23:06:03 +0000
committerGitHub <noreply@github.com>2021-09-17 23:06:03 +0000
commitd1c8149d07b6c4be63cec581e5a7f5108ce56058 (patch)
tree32b92340908a9374214ec7b84c1fac7ea338f56d /src/MxcImageProvider.h
parentMerge pull request #728 from Thulinma/goto (diff)
parentChange indentation to 4 spaces (diff)
downloadnheko-d1c8149d07b6c4be63cec581e5a7f5108ce56058.tar.xz
Merge pull request #729 from Nheko-Reborn/reformat
Change indentation to 4 spaces
Diffstat (limited to 'src/MxcImageProvider.h')
-rw-r--r--src/MxcImageProvider.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/MxcImageProvider.h b/src/MxcImageProvider.h

index 6de83c0e..3cf5bbf4 100644 --- a/src/MxcImageProvider.h +++ b/src/MxcImageProvider.h
@@ -19,46 +19,46 @@ class MxcImageResponse , public QRunnable { public: - MxcImageResponse(const QString &id, bool crop, double radius, const QSize &requestedSize) - : m_id(id) - , m_requestedSize(requestedSize) - , m_crop(crop) - , m_radius(radius) - { - setAutoDelete(false); - } + MxcImageResponse(const QString &id, bool crop, double radius, const QSize &requestedSize) + : m_id(id) + , m_requestedSize(requestedSize) + , m_crop(crop) + , m_radius(radius) + { + setAutoDelete(false); + } - QQuickTextureFactory *textureFactory() const override - { - return QQuickTextureFactory::textureFactoryForImage(m_image); - } - QString errorString() const override { return m_error; } + QQuickTextureFactory *textureFactory() const override + { + return QQuickTextureFactory::textureFactoryForImage(m_image); + } + QString errorString() const override { return m_error; } - void run() override; + void run() override; - QString m_id, m_error; - QSize m_requestedSize; - QImage m_image; - bool m_crop; - double m_radius; + QString m_id, m_error; + QSize m_requestedSize; + QImage m_image; + bool m_crop; + double m_radius; }; class MxcImageProvider : public QObject , public QQuickAsyncImageProvider { - Q_OBJECT + Q_OBJECT public slots: - QQuickImageResponse *requestImageResponse(const QString &id, - const QSize &requestedSize) override; + QQuickImageResponse *requestImageResponse(const QString &id, + const QSize &requestedSize) override; - static void addEncryptionInfo(mtx::crypto::EncryptedFile info); - static void download(const QString &id, - const QSize &requestedSize, - std::function<void(QString, QSize, QImage, QString)> then, - bool crop = true, - double radius = 0); + static void addEncryptionInfo(mtx::crypto::EncryptedFile info); + static void download(const QString &id, + const QSize &requestedSize, + std::function<void(QString, QSize, QImage, QString)> then, + bool crop = true, + double radius = 0); private: - QThreadPool pool; + QThreadPool pool; };