forked from qt-creator/qt-creator
QmlDesigner: Fix crash
I found the crash when opening: qtquickcontrols2\examples\quickcontrols2\contactlist\ContactForm.ui.qml. The crash was triggered by the root item being a layout. Change-Id: Id95aee6c76fbe1102578fb5a297b155645ebb157 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -371,6 +371,9 @@ bool itemIsMovable(const ModelNode &modelNode)
|
||||
if (modelNode.metaInfo().isSubclassOf("QtQuick.Controls.Tab"))
|
||||
return false;
|
||||
|
||||
if (!modelNode.hasParentProperty())
|
||||
return false;
|
||||
|
||||
if (!modelNode.parentProperty().isNodeListProperty())
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user