forked from qt-creator/qt-creator
QmlDesigner: Add isAliasExport to BindingProperty
Change-Id: I64ebe10541957f712b86a998e922a24111ad4a88 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
473c7d65d1
commit
d3992542b3
@@ -56,6 +56,8 @@ public:
|
||||
bool isList() const;
|
||||
QList<ModelNode> resolveToModelNodeList() const;
|
||||
|
||||
bool isAliasExport() const;
|
||||
|
||||
protected:
|
||||
BindingProperty(const PropertyName &propertyName, const Internal::InternalNodePointer &internalNode, Model* model, AbstractView *view);
|
||||
};
|
||||
|
@@ -197,6 +197,18 @@ QList<ModelNode> BindingProperty::resolveToModelNodeList() const
|
||||
return returnList;
|
||||
}
|
||||
|
||||
bool BindingProperty::isAliasExport() const
|
||||
{
|
||||
if (!isValid())
|
||||
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
|
||||
|
||||
return parentModelNode() == parentModelNode().view()->rootModelNode()
|
||||
&& isDynamic()
|
||||
&& dynamicTypeName() == "alias"
|
||||
&& name() == expression()
|
||||
&& parentModelNode().view()->modelNodeForId(expression()).isValid();
|
||||
}
|
||||
|
||||
void BindingProperty::setDynamicTypeNameAndExpression(const TypeName &typeName, const QString &expression)
|
||||
{
|
||||
Internal::WriteLocker locker(model());
|
||||
|
Reference in New Issue
Block a user