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