Commit b8fb4a13 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Add isValidQmlModelStateOperation



Change-Id: I10f4a9dbb2ba8ad25553b6cae10e78162514d85b
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 9a8f5383
......@@ -44,6 +44,7 @@ public:
ModelNode target() const;
void setTarget(const ModelNode &target);
bool isValid() const;
static bool isValidQmlModelStateOperation(const ModelNode &modelNode);
};
......
......@@ -60,9 +60,14 @@ bool QmlPropertyChanges::isValidQmlPropertyChanges(const ModelNode &modelNode)
bool QmlModelStateOperation::isValid() const
{
return QmlModelNodeFacade::isValid() && (
modelNode().metaInfo().isSubclassOf("<cpp>.QDeclarative1StateOperation", -1, -1)
|| modelNode().metaInfo().isSubclassOf("<cpp>.QQuickStateOperation", -1, -1));
return isValidQmlModelStateOperation(modelNode());
}
bool QmlModelStateOperation::isValidQmlModelStateOperation(const ModelNode &modelNode)
{
return isValidQmlModelNodeFacade(modelNode)
&& (modelNode.metaInfo().isSubclassOf("<cpp>.QDeclarative1StateOperation", -1, -1)
|| modelNode.metaInfo().isSubclassOf("<cpp>.QQuickStateOperation", -1, -1));
}
void QmlPropertyChanges::removeProperty(const PropertyName &name)
......
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