[frameworks/kguiaddons] src/util: Revert "Add findPixmapWithDevicePixelRatio to KImageCache"
Nicolas Fella <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit ecd4574b04dd2270b6e73aaea7ce4653d364e09e by Nicolas Fella.
Committed on 07/08/2026 at 11:16.
Pushed by nicolasfella into branch 'master'.
Revert "Add findPixmapWithDevicePixelRatio to KImageCache"
Due to post-merge review comments.
This reverts commit b7ee0958e7ffb608db355c6b38c8935840ce502e.
M +0 -34 src/util/kimagecache.h
https://invent.kde.org/frameworks/kguiaddons/-/commit/ecd4574b04dd2270b6e73aaea7ce4653d364e09e
diff --git a/src/util/kimagecache.h b/src/util/kimagecache.h
index 341e0ca..25b1c1d 100644
--- a/src/util/kimagecache.h
+++ b/src/util/kimagecache.h
@@ -160,40 +160,6 @@ public:
return true;
}
- /*!
- * Copies the cached pixmap identified by \a key to \a destination. If no such
- * pixmap exists \a destination is unchanged.
- *
- * Returns \c true if the pixmap identified by \a key existed, \c false otherwise.
- *
- * The resulting pixmap will have its devicePixelRatio set to \a devicePixelRatio
- *
- * \sa setPixmapCaching()
- * \since 6.29
- */
- bool findPixmapWithDevicePixelRatio(const QString &key, QPixmap *destination, qreal devicePixelRatio) const
- {
- if (findLocalPixmap(key, destination)) {
- destination->setDevicePixelRatio(devicePixelRatio);
- return true;
- }
-
- QByteArray cachedData;
- if (!this->find(key, &cachedData) || cachedData.isNull()) {
- return false;
- }
-
- if (destination) {
- destination->loadFromData(cachedData, "PNG", Qt::NoOpaqueDetection);
- destination->setDevicePixelRatio(devicePixelRatio);
-
- // Manually re-insert to pixmap cache if we'll be using this one.
- insertLocalPixmap(key, *destination);
- }
-
- return true;
- }
-
/*!
* Copies the cached image identified by \a key to \a destination. If no such
* image exists \a destination is unchanged.