From d76c799dd22a44621b557564ed9606e04ba40e34 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 1 Sep 2025 15:31:27 +1000 Subject: plugin: fix warnings + const stuff --- plugin/src/Caelestia/cachingimagemanager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugin/src/Caelestia/cachingimagemanager.cpp') diff --git a/plugin/src/Caelestia/cachingimagemanager.cpp b/plugin/src/Caelestia/cachingimagemanager.cpp index 63826ea..4f37171 100644 --- a/plugin/src/Caelestia/cachingimagemanager.cpp +++ b/plugin/src/Caelestia/cachingimagemanager.cpp @@ -23,7 +23,7 @@ int CachingImageManager::effectiveWidth() const { return 0; } - int width = std::ceil(m_item->width() * effectiveScale()); + int width = static_cast(std::ceil(m_item->width() * effectiveScale())); m_item->setProperty("sourceWidth", width); return width; } @@ -33,7 +33,7 @@ int CachingImageManager::effectiveHeight() const { return 0; } - int height = std::ceil(m_item->height() * effectiveScale()); + int height = static_cast(std::ceil(m_item->height() * effectiveScale())); m_item->setProperty("sourceHeight", height); return height; } @@ -109,7 +109,7 @@ void CachingImageManager::updateSource(const QString& path) { m_shaPath = path; - QPointer self(this); + const QPointer self(this); QThreadPool::globalInstance()->start([path, self] { const QString sha = self->sha256sum(path); @@ -119,8 +119,8 @@ void CachingImageManager::updateSource(const QString& path) { return; } - int width = self->effectiveWidth(); - int height = self->effectiveHeight(); + const int width = self->effectiveWidth(); + const int height = self->effectiveHeight(); if (!self->m_item || !width || !height) { return; @@ -144,7 +144,7 @@ void CachingImageManager::updateSource(const QString& path) { return; } - QImageReader reader(cache.toLocalFile()); + const QImageReader reader(cache.toLocalFile()); if (reader.canRead()) { self->m_item->setProperty("source", cache); } else { -- cgit v1.2.3-freya