remove the icon if an invalid value is passed
This commit is contained in:
parent
6dd904d239
commit
0b9e172a88
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user