fallback here too if the element doesn't exist

svn path=/trunk/KDE/kdelibs/; revision=1129432
This commit is contained in:
Marco Martin 2010-05-22 11:40:22 +00:00
parent 5f04930024
commit df3259842c

View File

@ -126,6 +126,9 @@ void PopupApplet::setPopupIcon(const QString &iconName)
if (!d->icon) {
d->icon = new Plasma::IconWidget(this);
d->icon->setSvg(name, iconName);
if (d->icon->svg().isEmpty()) {
setPopupIcon(KIcon(iconName));
}
connect(d->icon, SIGNAL(clicked()), this, SLOT(internalTogglePopup()));
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout();
@ -136,6 +139,9 @@ void PopupApplet::setPopupIcon(const QString &iconName)
setLayout(layout);
} else {
d->icon->setSvg(name, iconName);
if (d->icon->svg().isEmpty()) {
setPopupIcon(KIcon(iconName));
}
}
// Final Attempt: use KIcon
} else {