Commit 282de657 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Rename hasDefaultProperty to hasDefaultPropertyName

hasDefaultProperty sounded like the property existed in the model not
in the meta info system.

Change-Id: Iaa670f10b9d6d6038fbc3a4224250ed821407af4
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 4d3c15f8
...@@ -113,7 +113,7 @@ static inline void reparentTo(const ModelNode &node, const QmlItemNode &parent) ...@@ -113,7 +113,7 @@ static inline void reparentTo(const ModelNode &node, const QmlItemNode &parent)
if (parent.isValid() && node.isValid()) { if (parent.isValid() && node.isValid()) {
NodeAbstractProperty parentProperty; NodeAbstractProperty parentProperty;
if (parent.hasDefaultProperty()) if (parent.hasDefaultPropertyName())
parentProperty = parent.nodeAbstractProperty(parent.defaultPropertyName()); parentProperty = parent.nodeAbstractProperty(parent.defaultPropertyName());
else else
parentProperty = parent.nodeAbstractProperty("data"); parentProperty = parent.nodeAbstractProperty("data");
......
...@@ -348,7 +348,7 @@ void MoveManipulator::reparentTo(FormEditorItem *newParent) ...@@ -348,7 +348,7 @@ void MoveManipulator::reparentTo(FormEditorItem *newParent)
QmlItemNode parentItemNode(newParent->qmlItemNode()); QmlItemNode parentItemNode(newParent->qmlItemNode());
if (parentItemNode.isValid()) { if (parentItemNode.isValid()) {
if (parentItemNode.hasDefaultProperty()) if (parentItemNode.hasDefaultPropertyName())
parentProperty = parentItemNode.nodeAbstractProperty(parentItemNode.defaultPropertyName()); parentProperty = parentItemNode.nodeAbstractProperty(parentItemNode.defaultPropertyName());
else else
parentProperty = parentItemNode.nodeAbstractProperty("data"); parentProperty = parentItemNode.nodeAbstractProperty("data");
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
bool isAncestorOf(const QmlObjectNode &objectNode) const; bool isAncestorOf(const QmlObjectNode &objectNode) const;
bool hasDefaultProperty() const; bool hasDefaultPropertyName() const;
PropertyName defaultPropertyName() const; PropertyName defaultPropertyName() const;
static QVariant instanceValue(const ModelNode &modelNode, const PropertyName &name); static QVariant instanceValue(const ModelNode &modelNode, const PropertyName &name);
......
...@@ -147,7 +147,7 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary ...@@ -147,7 +147,7 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary
newQmlItemNode = createQmlItemNodeFromSource(view, itemLibraryEntry.qml(), position); newQmlItemNode = createQmlItemNodeFromSource(view, itemLibraryEntry.qml(), position);
} }
if (parentQmlItemNode.hasDefaultProperty()) if (parentQmlItemNode.hasDefaultPropertyName())
parentQmlItemNode.nodeAbstractProperty(parentQmlItemNode.defaultPropertyName()).reparentHere(newQmlItemNode); parentQmlItemNode.nodeAbstractProperty(parentQmlItemNode.defaultPropertyName()).reparentHere(newQmlItemNode);
if (!newQmlItemNode.isValid()) if (!newQmlItemNode.isValid())
......
...@@ -517,7 +517,7 @@ QString QmlObjectNode::validId() ...@@ -517,7 +517,7 @@ QString QmlObjectNode::validId()
return modelNode().validId(); return modelNode().validId();
} }
bool QmlObjectNode::hasDefaultProperty() const bool QmlObjectNode::hasDefaultPropertyName() const
{ {
return modelNode().metaInfo().hasDefaultProperty(); return modelNode().metaInfo().hasDefaultProperty();
} }
...@@ -529,7 +529,7 @@ PropertyName QmlObjectNode::defaultPropertyName() const ...@@ -529,7 +529,7 @@ PropertyName QmlObjectNode::defaultPropertyName() const
void QmlObjectNode::setParent(QmlObjectNode newParent) void QmlObjectNode::setParent(QmlObjectNode newParent)
{ {
if (newParent.hasDefaultProperty()) if (newParent.hasDefaultPropertyName())
newParent.modelNode().nodeAbstractProperty(newParent.defaultPropertyName()).reparentHere(modelNode()); newParent.modelNode().nodeAbstractProperty(newParent.defaultPropertyName()).reparentHere(modelNode());
} }
......
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