From 4d4a7713fb936f632dc655abd0196adada0784de Mon Sep 17 00:00:00 2001 From: Tannin Date: Fri, 27 Mar 2015 16:36:55 +0100 Subject: bugfix: not all icons showed up --- src/icondelegate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/icondelegate.cpp') diff --git a/src/icondelegate.cpp b/src/icondelegate.cpp index 794ac7f3..ef9011b6 100644 --- a/src/icondelegate.cpp +++ b/src/icondelegate.cpp @@ -45,10 +45,16 @@ void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, painter->translate(option.rect.topLeft()); for (const QString &iconId : icons) { + if (iconId.isEmpty()) { + continue; + } QPixmap icon; QString fullIconId = QString("%1_%2").arg(iconId).arg(iconWidth); if (!QPixmapCache::find(fullIconId, &icon)) { icon = QIcon(iconId).pixmap(iconWidth, iconWidth); + if (icon.isNull()) { + qWarning("failed to load icon %s", qPrintable(iconId)); + } QPixmapCache::insert(fullIconId, icon); } painter->drawPixmap(x, 2, iconWidth, iconWidth, icon); -- cgit v1.3.1