diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-11 06:35:41 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-11 06:39:48 (GMT) |
commit | 54bdab8b88777488f9f0d944698fbb155cf703af (patch) | |
tree | 3e143e77e22e68a13ca7fd81178899bdd91b0a30 /src/declarative/qml/qdeclarativeobjectscriptclass.cpp | |
parent | fef9bb355f964f7a520da0c5e24d165644be1473 (diff) | |
download | Qt-54bdab8b88777488f9f0d944698fbb155cf703af.zip Qt-54bdab8b88777488f9f0d944698fbb155cf703af.tar.gz Qt-54bdab8b88777488f9f0d944698fbb155cf703af.tar.bz2 |
Improve value type binding behavior
Changing value type bindings in state changes, and implicitly removing
them on property assignment was not reliable. Internally the system
considered a binding on "font" and one on "font.x" as a binding on two
separate properties, even though the "font" binding completely
overrides the "font.x" property.
Following this change a binding to "font.x" creates a proxy binding object
on the "font" property in addition to the "font.x" binding itself. This
allows behavior to be consistent across all operations.
QT-2920
Diffstat (limited to 'src/declarative/qml/qdeclarativeobjectscriptclass.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index dc4a676..68780b6 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -351,7 +351,8 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj, } } - QDeclarativeAbstractBinding *delBinding = QDeclarativePropertyPrivate::setBinding(obj, *lastData, 0); + QDeclarativeAbstractBinding *delBinding = + QDeclarativePropertyPrivate::setBinding(obj, lastData->coreIndex, -1, 0); if (delBinding) delBinding->destroy(); |