Fix initialization of QDeclarativeVMEMetaData::PropertyData for variant properties.
authorRoberto Raggi <roberto.raggi@nokia.com>
Mon, 1 Aug 2011 15:08:06 +0000 (17:08 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 30 Aug 2011 11:18:28 +0000 (13:18 +0200)
The propertyType member for variant properties needs to be initialized to -1 (at least
according to QDeclarativeVMEMetaObject::metaCall).

Change-Id: I44f226f2bce3732f3a4220fe24617b5cb2292f97
Reviewed-on: http://codereview.qt.nokia.com/3778
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>

src/declarative/qml/qdeclarativecompiler.cpp

index 6874c2a..6c4bbb4 100644 (file)
@@ -2623,7 +2623,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn
                     typeRefs[p->type] = builder.newString(strlen(builtinTypes[p->type].cppType));
                 typeRef = typeRefs[p->type];
                 if (p->type == Object::DynamicProperty::Variant)
-                    propertyType = qMetaTypeId<QVariant>();
+                    propertyType = -1;
 
             } else {
                 Q_ASSERT(p->type == Object::DynamicProperty::CustomList ||