QmlDesigner: Add hasDefaultNodeAbstracProperty to ModelNode

Change-Id: I421686cdc9faf2a9dadad3162cfbfc6793ab3caf
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-07-30 17:29:00 +02:00
parent d7402bfff3
commit 444bc6c986
2 changed files with 6 additions and 1 deletions

View File

@@ -139,10 +139,10 @@ public:
bool hasVariantProperty(const PropertyName &name) const; bool hasVariantProperty(const PropertyName &name) const;
bool hasBindingProperty(const PropertyName &name) const; bool hasBindingProperty(const PropertyName &name) const;
bool hasNodeAbstracProperty(const PropertyName &name) const; bool hasNodeAbstracProperty(const PropertyName &name) const;
bool hasDefaultNodeAbstracProperty() const;
bool hasNodeProperty(const PropertyName &name) const; bool hasNodeProperty(const PropertyName &name) const;
bool hasNodeListProperty(const PropertyName &name) const; bool hasNodeListProperty(const PropertyName &name) const;
void setScriptFunctions(const QStringList &scriptFunctionList); void setScriptFunctions(const QStringList &scriptFunctionList);
QStringList scriptFunctions() const; QStringList scriptFunctions() const;

View File

@@ -859,6 +859,11 @@ bool ModelNode::hasNodeAbstracProperty(const PropertyName &name) const
return hasProperty(name) && internalNode()->property(name)->isNodeAbstractProperty(); return hasProperty(name) && internalNode()->property(name)->isNodeAbstractProperty();
} }
bool ModelNode::hasDefaultNodeAbstracProperty() const
{
return hasProperty(metaInfo().defaultPropertyName()) && internalNode()->property(metaInfo().defaultPropertyName())->isNodeAbstractProperty();
}
bool ModelNode::hasNodeProperty(const PropertyName &name) const bool ModelNode::hasNodeProperty(const PropertyName &name) const
{ {
return hasProperty(name) && internalNode()->property(name)->isNodeProperty(); return hasProperty(name) && internalNode()->property(name)->isNodeProperty();