Commit 00c8e760 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.core: changes QASSERT into condition

The "data" property actually might be a binding. At least
the QmlEngine accepts this case. We do nit resolve such
bindings at the moment, but we do not assert anymore.

Reviewed-by: Marco Bubke
parent 0624d6ec
......@@ -90,13 +90,13 @@ QList<QmlItemNode> QmlItemNode::children() const
QList<ModelNode> modelNodeList;
if (modelNode().hasProperty("children")) {
Q_ASSERT(modelNode().property("children").isNodeListProperty());
modelNodeList.append(modelNode().nodeListProperty("children").toModelNodeList());
if (modelNode().property("children").isNodeListProperty())
modelNodeList.append(modelNode().nodeListProperty("children").toModelNodeList());
}
if (modelNode().hasProperty("data")) {
Q_ASSERT(modelNode().property("data").isNodeListProperty());
modelNodeList.append(modelNode().nodeListProperty("data").toModelNodeList());
if (modelNode().property("data").isNodeListProperty())
modelNodeList.append(modelNode().nodeListProperty("data").toModelNodeList());
}
foreach (const ModelNode &modelNode, modelNodeList) {
......@@ -114,13 +114,13 @@ QList<QmlObjectNode> QmlItemNode::resources() const
if (isValid()) {
QList<ModelNode> modelNodeList;
if (modelNode().hasProperty("resources")) {
Q_ASSERT(modelNode().property("resources").isNodeListProperty());
modelNodeList.append(modelNode().nodeListProperty("resources").toModelNodeList());
if (modelNode().property("resources").isNodeListProperty())
modelNodeList.append(modelNode().nodeListProperty("resources").toModelNodeList());
}
if (modelNode().hasProperty("data")) {
Q_ASSERT(modelNode().property("data").isNodeListProperty());
modelNodeList.append(modelNode().nodeListProperty("data").toModelNodeList());
if (modelNode().property("data").isNodeListProperty())
modelNodeList.append(modelNode().nodeListProperty("data").toModelNodeList());
}
foreach (const ModelNode &node, modelNodeList) {
......
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