Return correct propertyIndex for v4 bindings.
authorMichael Brasser <michael.brasser@nokia.com>
Wed, 29 Feb 2012 03:55:58 +0000 (13:55 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 2 Mar 2012 06:22:53 +0000 (07:22 +0100)
Change-Id: I4aa37491d36331889f6b30c4d4af8b56cef96225
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
src/declarative/qml/v4/qv4bindings.cpp
src/declarative/qml/v4/qv4bindings_p.h

index 2c26fff..319dbf5 100644 (file)
@@ -256,7 +256,8 @@ void QV4Bindings::Binding::destroy()
 
 int QV4Bindings::Binding::propertyIndex() const
 {
-    return property;
+    //mask out the type information set for value types
+    return property & 0xFF00FFFF;
 }
 
 QObject *QV4Bindings::Binding::object() const
index 58dd432..a447481 100644 (file)
@@ -96,6 +96,8 @@ private:
         int index:30;
         bool enabled:1;
         bool updating:1;
+        // Encoding of property is coreIndex | (propType << 16) | (valueTypeIndex << 24)
+        // propType and valueTypeIndex are only set if the property is a value type property
         int property;
         QObject *scope;
         int line;