only set an image when we have one
This commit is contained in:
parent
ee81650232
commit
35580a01be
@ -163,7 +163,12 @@ void ToolTipProxy::updateToolTip()
|
|||||||
Plasma::ToolTipContent data;
|
Plasma::ToolTipContent data;
|
||||||
data.setMainText(m_mainText);
|
data.setMainText(m_mainText);
|
||||||
data.setSubText(m_subText);
|
data.setSubText(m_subText);
|
||||||
data.setImage(KIcon(m_image).pixmap(IconSize(KIconLoader::Desktop)));
|
if (!m_image.isEmpty()) {
|
||||||
|
KIcon icon(m_image);
|
||||||
|
if (!icon.isNull()) {
|
||||||
|
data.setImage(icon.pixmap(IconSize(KIconLoader::Desktop)));
|
||||||
|
}
|
||||||
|
}
|
||||||
Plasma::ToolTipManager::self()->setContent(m_widget, data);
|
Plasma::ToolTipManager::self()->setContent(m_widget, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user