summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeproperty_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-11 16:35:41 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-11 16:39:48 +1000
commit54bdab8b88777488f9f0d944698fbb155cf703af (patch)
tree3e143e77e22e68a13ca7fd81178899bdd91b0a30 /src/declarative/qml/qdeclarativeproperty_p.h
parentfef9bb355f964f7a520da0c5e24d165644be1473 (diff)
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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h
index c31e2d376a..26b85b8aa5 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)