summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Fischer <[email protected]>2014-12-29 12:22:32 +0100
committerAndi Fischer <[email protected]>2014-12-29 12:22:32 +0100
commita5ae9378dd5bb1703827ebf388e70ec1c7f1d9a1 (patch)
treee37e8ec2ed30715ea52ba20ab782c927164a4b79
parent64ba91b0b48398e0d2dc192c0219cbfe8c172634 (diff)
Small changes.
-rw-r--r--umbrello/umllistviewitem.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/umbrello/umllistviewitem.cpp b/umbrello/umllistviewitem.cpp
index 64536bd..6b8100e 100644
--- a/umbrello/umllistviewitem.cpp
+++ b/umbrello/umllistviewitem.cpp
@@ -32,7 +32,7 @@
// kde includes
#include <KLocalizedString>
-#include <kmessagebox.h>
+#include <KMessageBox>
// qt includes
#include <QDrag>
@@ -402,8 +402,9 @@ void UMLListViewItem::updateFolder()
Icon_Utils::IconType icon = Model_Utils::convert_LVT_IT(m_type, m_object);
if (icon) {
- if (Model_Utils::typeIsFolder(m_type))
+ if (Model_Utils::typeIsFolder(m_type)) {
icon = (Icon_Utils::IconType)((int)icon + (int)isExpanded());
+ }
//FIXME KF5 setIcon(icon);
}
}
@@ -449,7 +450,9 @@ QString UMLListViewItem::getSavedText() const
void UMLListViewItem::setIcon(Icon_Utils::IconType iconType)
{
QPixmap p = Icon_Utils::SmallIcon(iconType);
- QTreeWidgetItem::setIcon(0, QIcon(p));
+ if (!p.isNull()) {
+ QTreeWidgetItem::setIcon(0, QIcon(p));
+ }
}
/**