Enable tst_qqmlpropertycache
authorChris Adams <christopher.adams@nokia.com>
Thu, 12 Jul 2012 02:00:22 +0000 (12:00 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 12 Jul 2012 04:33:06 +0000 (06:33 +0200)
Due to the lazy metaobject initialization change, the property cache's
append method is now private.  Instead, it offers a copyAndAppend
method which the test should use.

Change-Id: I1279eb997832244593aa11d5644d14b31ea68dd2
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
tests/auto/qml/qml.pro
tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp

index 2c5d367..e24e30d 100644 (file)
@@ -35,6 +35,7 @@ PRIVATETESTS += \
     qqmlinstruction \
     qqmllanguage \
     qqmlproperty \
+    qqmlpropertycache \
     qqmlpropertymap \
     qqmlsqldatabase \
     qqmlvaluetypes \
index b702623..de3c041 100644 (file)
@@ -131,8 +131,7 @@ void tst_qqmlpropertycache::propertiesDerived()
     const QMetaObject *metaObject = object.metaObject();
 
     QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject));
-    QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copy());
-    cache->append(&engine, object.metaObject());
+    QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copyAndAppend(&engine, object.metaObject()));
     QQmlPropertyData *data;
 
     QVERIFY(data = cache->property(QLatin1String("propertyA")));
@@ -189,8 +188,7 @@ void tst_qqmlpropertycache::methodsDerived()
     const QMetaObject *metaObject = object.metaObject();
 
     QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject));
-    QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copy());
-    cache->append(&engine, object.metaObject());
+    QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copyAndAppend(&engine, object.metaObject()));
     QQmlPropertyData *data;
 
     QVERIFY(data = cache->property(QLatin1String("slotA")));
@@ -253,8 +251,7 @@ void tst_qqmlpropertycache::signalHandlersDerived()
     const QMetaObject *metaObject = object.metaObject();
 
     QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject));
-    QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copy());
-    cache->append(&engine, object.metaObject());
+    QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copyAndAppend(&engine, object.metaObject()));
     QQmlPropertyData *data;
 
     QVERIFY(data = cache->property(QLatin1String("onSignalA")));