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/qdeclarativeproperty_p.h | |
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/qdeclarativeproperty_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativeproperty_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h index c31e2d3..26b85b8 100644 --- a/src/declarative/qml/qdeclarativeproperty_p.h +++ b/src/declarative/qml/qdeclarativeproperty_p.h @@ -110,7 +110,7 @@ public: const QVariant &value, int flags); static bool write(QObject *, const QDeclarativePropertyCache::Data &, const QVariant &, QDeclarativeContext *, WriteFlags flags = 0); - static QDeclarativeAbstractBinding *setBinding(QObject *, const QDeclarativePropertyCache::Data &, + static QDeclarativeAbstractBinding *setBinding(QObject *, int coreIndex, int valueTypeIndex /* -1 */, QDeclarativeAbstractBinding *, WriteFlags flags = DontRemoveBinding); @@ -133,6 +133,7 @@ public: QDeclarativeExpression *) ; static bool write(const QDeclarativeProperty &that, const QVariant &, WriteFlags); static int valueTypeCoreIndex(const QDeclarativeProperty &that); + static int bindingIndex(const QDeclarativeProperty &that); }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePropertyPrivate::WriteFlags) |