forked from qt-creator/qt-creator
QmlDesigner.componentView: code cleanup
Explicit braces to avoid ambiguous ‘else’. Change-Id: Ic1a48b41b229ba47f7ab737a883277a6547e30ce Reviewed-on: http://codereview.qt.nokia.com/521 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user