Skip to content
Snippets Groups Projects
Commit ecc8bfd0 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Add isValidQmlPropertyChanges


Change-Id: Ib859c10fc17148822e18c2d4e03c229ae6f8230d
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent cc75d77c
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ public: ...@@ -53,6 +53,7 @@ public:
QmlPropertyChanges() : QmlModelStateOperation() {} QmlPropertyChanges() : QmlModelStateOperation() {}
QmlPropertyChanges(const ModelNode &modelNode) : QmlModelStateOperation(modelNode) {} QmlPropertyChanges(const ModelNode &modelNode) : QmlModelStateOperation(modelNode) {}
bool isValid() const; bool isValid() const;
static bool isValidQmlPropertyChanges(const ModelNode &modelNode);
void removeProperty(const PropertyName &name); void removeProperty(const PropertyName &name);
}; };
......
...@@ -50,7 +50,12 @@ void QmlModelStateOperation::setTarget(const ModelNode &target) ...@@ -50,7 +50,12 @@ void QmlModelStateOperation::setTarget(const ModelNode &target)
bool QmlPropertyChanges::isValid() const bool QmlPropertyChanges::isValid() const
{ {
return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isSubclassOf("QtQuick.PropertyChanges", -1, -1); return isValidQmlPropertyChanges(modelNode());
}
bool QmlPropertyChanges::isValidQmlPropertyChanges(const ModelNode &modelNode)
{
return isValidQmlModelNodeFacade(modelNode) && modelNode.metaInfo().isSubclassOf("QtQuick.PropertyChanges", -1, -1);
} }
bool QmlModelStateOperation::isValid() const bool QmlModelStateOperation::isValid() const
......
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