From 671d96383b2668ef773a49ba943328ddf0c98420 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 25 Feb 2015 17:48:37 +0100 Subject: icon delegates now use a pixmap cache to improve rendering performance --- src/genericicondelegate.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/genericicondelegate.cpp') diff --git a/src/genericicondelegate.cpp b/src/genericicondelegate.cpp index c3471735..3711b428 100644 --- a/src/genericicondelegate.cpp +++ b/src/genericicondelegate.cpp @@ -1,6 +1,7 @@ #include "genericicondelegate.h" #include "pluginlist.h" #include +#include GenericIconDelegate::GenericIconDelegate(QObject *parent, int role, int logicalIndex, int compactSize) @@ -19,14 +20,13 @@ void GenericIconDelegate::columnResized(int logicalIndex, int, int newSize) } } -QList GenericIconDelegate::getIcons(const QModelIndex &index) const +QList GenericIconDelegate::getIcons(const QModelIndex &index) const { - QList result; + QList result; if (index.isValid()) { foreach (const QVariant &var, index.data(m_Role).toList()) { - QIcon icon = var.value(); - if (!m_Compact || !icon.isNull()) { - result.append(icon); + if (!m_Compact || !var.toString().isEmpty()) { + result.append(var.toString()); } } } -- cgit v1.3.1