]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix qrc icon
authorAlexander Lohnau <alexander.lohnau@gmx.de>
Thu, 12 Nov 2020 09:01:08 +0000 (10:01 +0100)
committerAlexander Lohnau <alexander.lohnau@gmx.de>
Thu, 12 Nov 2020 16:16:50 +0000 (17:16 +0100)
Apparently the icon was not null, because the mimetype was known.
But there was no icon associated with it and we got an
icon which is not null, but has a null pixmap.

src/kitemviews/kstandarditemlistwidget.cpp

index 83dc0394da28e3112608c9fabbd384745d6530a0..73744b385e3f7e5e00f25272cc276cd0ce56b07a 100644 (file)
@@ -1488,7 +1488,8 @@ QPixmap KStandardItemListWidget::pixmapForIcon(const QString& name, const QStrin
         if (icon.isNull()) {
             icon = QIcon(name);
         }
-        if (icon.isNull()) {
+        if (icon.isNull()
+            || icon.pixmap(size / qApp->devicePixelRatio(), size / qApp->devicePixelRatio(), mode).isNull()) {
             icon = fallbackIcon;
         }