QmlDesigner.QmlPuppet: fix for bindings and alias properties

For alias properties a binding to the original property
was not properly enabled.
This means that if bindings were reseted the original value from the binding
was overwriting any change to this property.

Solution: We disable the binding of the alias property manually using the
hash from resetBinding().

Task-number: QTCREATORBUG-9582
Change-Id: I7a891bbdd06154de8a4e1ff2d3c0939d4e8b4010
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
Thomas Hartmann
2013-08-26 12:06:04 +02:00
parent 4433f7aadd
commit cb0e37128b

View File

@@ -453,6 +453,7 @@ void ObjectNodeInstance::setPropertyVariant(const PropertyName &name, const QVar
if (hasValidResetBinding(name)) { if (hasValidResetBinding(name)) {
QDeclarativePropertyPrivate::setBinding(property, 0, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); QDeclarativePropertyPrivate::setBinding(property, 0, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
resetBinding(name)->setEnabled(false);
} }
bool isWritten = property.write(convertSpecialCharacter(fixedValue)); bool isWritten = property.write(convertSpecialCharacter(fixedValue));