Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment