Allocate a JS wrapper if there are any properties
authorFrank Meerkoetter <frank.meerkoetter@basyskom.com>
Fri, 7 Aug 2015 20:47:40 +0000 (22:47 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Tue, 18 Aug 2015 20:26:46 +0000 (20:26 +0000)
Properties are now stored as QV4::Values.

Change-Id: I586ccacbeb3c131ff4af2e5913c484dc4f4b7462
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/qml/qml/qqmlvmemetaobject.cpp

index 6a12674..c7993e6 100644 (file)
@@ -171,10 +171,10 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
     int list_type = qMetaTypeId<QQmlListProperty<QObject> >();
     int qobject_type = qMetaTypeId<QObject*>();
     int variant_type = qMetaTypeId<QVariant>();
-    // Need JS wrapper to ensure variant and var properties are marked.
+    // Need JS wrapper to ensure properties are marked.
     // ### FIXME: I hope that this can be removed once we have the proper scope chain
     // set up and the JS wrappers always exist.
-    bool needsJSWrapper = (metaData->varPropertyCount > 0);
+    bool needsJSWrapper = (metaData->propertyCount > 0);
 
     // ### Optimize
     for (int ii = 0; ii < metaData->propertyCount - metaData->varPropertyCount; ++ii) {