Fix type of valuetype alias properties.
authorRoberto Raggi <roberto.raggi@nokia.com>
Thu, 18 Aug 2011 11:01:05 +0000 (13:01 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 30 Aug 2011 11:18:28 +0000 (13:18 +0200)
Update the type and the typename after changing the value of
aliasProperty.

Change-Id: Id0b9d9a66f14524fec6bf23c375ae9af448cbbf3
Reviewed-on: http://codereview.qt.nokia.com/3790
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
src/declarative/qml/qdeclarativecompiler.cpp

index c920a33..033bd6b 100644 (file)
@@ -2999,6 +2999,11 @@ bool QDeclarativeCompiler::compileAlias(QFastMetaBuilder &builder,
             
             aliasProperty = valueType->metaObject()->property(valueTypeIndex);
             propIdx |= (valueTypeIndex << 16);
+
+            // update the property type
+            type = aliasProperty.type();
+            if (type >= QVariant::UserType)
+                type = 0;
         }
 
         if (aliasProperty.isEnumType())