Commit 927767c6 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Tim Jenssen
Browse files

QmlDesigner: Fix crash

We removed support for non default properties in the navigator.
But the model still allows QML code like this:  toolBar: ToolBar {...}

In this case ToolBar is not visible in the navigator. But the ToolBar
is available/visible in the form editor. Reparenting anything to ToolBar did
crash. Eventually we have to re enable non default properties, but this
patch only fixes the crash.

Task-number: QTCREATORBUG-15111
Change-Id: Ifa037975c99762fb8067afffa118332044842d7f
Reviewed-by: default avatarEike Ziller <>
Reviewed-by: default avatarTim Jenssen <>
parent 02e387f5
...@@ -565,7 +565,8 @@ static void appendNodeToEndOfTheRow(const ModelNode &modelNode, const ItemRow &n ...@@ -565,7 +565,8 @@ static void appendNodeToEndOfTheRow(const ModelNode &modelNode, const ItemRow &n
parentPropertyItem->appendRow(newItemRow.toList()); parentPropertyItem->appendRow(newItemRow.toList());
} else { } else {
QStandardItem *parentDefaultPropertyItem = parentRow.idItem; QStandardItem *parentDefaultPropertyItem = parentRow.idItem;
parentDefaultPropertyItem->appendRow(newItemRow.toList()); if (parentDefaultPropertyItem)
} }
} else { // root node } else { // root node
treeModel->appendRow(newItemRow.toList()); treeModel->appendRow(newItemRow.toList());
Markdown is supported
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