QmlDesigner.componentView: fix for captions

Change-Id: I0ea2441d2989b8e395955b5e19ad45d341d12379
Reviewed-on: http://codereview.qt.nokia.com/716
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
Thomas Hartmann
2011-06-24 16:05:49 +02:00
parent 05de65756d
commit 8102f3f6d2

View File

@@ -142,10 +142,10 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node)
QString description;
ModelNode parentNode = node.parentProperty().parentModelNode();
if (parentNode.isValid()) {
if (!parentNode.id().isEmpty()) {
description = node.parentProperty().parentModelNode().id() + QLatin1Char(' ');
if (parentNode.id().isEmpty()) {
description = parentNode.simplifiedTypeName() + QLatin1Char(' ');
} else {
description = node.parentProperty().parentModelNode().simplifiedTypeName() + QLatin1Char(' ');
description = parentNode.id() + QLatin1Char(' ');
}
}
description += node.parentProperty().name();