remove the icon if an invalid value is passed

This commit is contained in:
Marco Martin 2012-08-01 13:25:55 +02:00
parent 6dd904d239
commit 0b9e172a88

View File

@ -42,9 +42,10 @@ void QIconItem::setIcon(const QVariant &icon)
{
if(icon.canConvert<QIcon>()) {
m_icon = icon.value<QIcon>();
}
else if(icon.canConvert<QString>()) {
} else if(icon.canConvert<QString>()) {
m_icon = KIcon(icon.toString());
} else {
m_icon = QIcon();
}
update();
}