diff --git a/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.cpp b/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.cpp index 267351eedcf371ddeb2a019f6cbe039573b95a7f..6d3de322f6db437e6bff3dd76bfe24ce2a7965bb 100644 --- a/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.cpp +++ b/src/plugins/qmldesigner/core/instances/qmlpropertychangesnodeinstance.cpp @@ -134,26 +134,27 @@ QmlPropertyChangesNodeInstance::Pointer void QmlPropertyChangesNodeInstance::setPropertyVariant(const QString &name, const QVariant &value) { - QmlMetaProperty metaProperty = QmlMetaProperty::createProperty(object(), name, context()); - if (metaProperty.isValid()) { // 'restoreEntryValues', 'explicit' + QMetaObject metaObject = QmlPropertyChangesObject::staticMetaObject; + + if (metaObject.indexOfProperty(name.toLatin1()) > 0) { // 'restoreEntryValues', 'explicit' ObjectNodeInstance::setPropertyVariant(name, value); return; + } else { + changesObject()->m_properties.insert(name, value); updateStateInstance(); } - changesObject()->m_properties.insert(name, value); - - updateStateInstance(); } void QmlPropertyChangesNodeInstance::setPropertyBinding(const QString &name, const QString &expression) { - QmlMetaProperty metaProperty = QmlMetaProperty::createProperty(object(), name, context()); - if (metaProperty.isValid()) { // 'target' + QMetaObject metaObject = QmlPropertyChangesObject::staticMetaObject; + + if (metaObject.indexOfProperty(name.toLatin1()) > 0) { // 'restoreEntryValues', 'explicit' ObjectNodeInstance::setPropertyBinding(name, expression); return; + } else { + changesObject()->m_expressions.insert(name, expression); + updateStateInstance(); } - changesObject()->m_expressions.insert(name, expression); - - updateStateInstance(); } QVariant QmlPropertyChangesNodeInstance::property(const QString &name) const