From 02b165f1fabecb03d0172f7ac9660aa8ed072f6f Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 25 Dec 2024 14:22:14 +0100 Subject: [PATCH] QAbstractFileIconEngine: store pixmaps with correct key QAbstractFileIconEngine stores the generated pixmap in a QPixmapCache with the size as key. This is wrong as the size is multiplied by the current devicePixelRatio so this has to be done also for the key. Change-Id: I6d8ceedc950d23abf9c4d79d92e86848b9508c9b Reviewed-by: Volker Hilsheimer (cherry picked from commit 83ff179f85559af880d28d7832d44f95c5ce9616) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit da4e9b7637f3ac71397c91109c460ca781abbc7a) --- src/gui/image/qabstractfileiconengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qabstractfileiconengine.cpp b/src/gui/image/qabstractfileiconengine.cpp index b9b9abc1f55..afb25612826 100644 --- a/src/gui/image/qabstractfileiconengine.cpp +++ b/src/gui/image/qabstractfileiconengine.cpp @@ -44,7 +44,7 @@ QPixmap QAbstractFileIconEngine::scaledPixmap(const QSize &size, QIcon::Mode mod if (key.isEmpty()) return filePixmap(size * scale, mode, state); - key += u'_' + QString::number(size.width()); + key += u'_' + QString::number(size.width() * scale); QPixmap result; if (!QPixmapCache::find(key, &result)) {