Commit cb63aea8 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.componentView: code cleanup

Explicit braces to avoid ambiguous ‘else’.

Change-Id: Ic1a48b41b229ba47f7ab737a883277a6547e30ce
Reviewed-on: http://codereview.qt.nokia.com/521

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent 8e7814b0
......@@ -141,11 +141,13 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node)
} else {
QString description;
ModelNode parentNode = node.parentProperty().parentModelNode();
if (parentNode.isValid())
if (!parentNode.id().isEmpty())
if (parentNode.isValid()) {
if (!parentNode.id().isEmpty()) {
description = node.parentProperty().parentModelNode().id() + QLatin1Char(' ');
else
} else {
description = node.parentProperty().parentModelNode().simplifiedTypeName() + QLatin1Char(' ');
}
}
description += node.parentProperty().name();
QStandardItem *item = new QStandardItem(description);
item->setData(QVariant::fromValue(node), ModelNodeRole);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment