From 3b23b298fbf9e2b80b96e662215154e55c319871 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Thu, 12 Jul 2012 12:00:22 +1000 Subject: [PATCH] Enable tst_qqmlpropertycache 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 --- tests/auto/qml/qml.pro | 1 + .../qqmlpropertycache/tst_qqmlpropertycache.cpp | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index 2c5d367..e24e30d 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -35,6 +35,7 @@ PRIVATETESTS += \ qqmlinstruction \ qqmllanguage \ qqmlproperty \ + qqmlpropertycache \ qqmlpropertymap \ qqmlsqldatabase \ qqmlvaluetypes \ diff --git a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp index b702623..de3c041 100644 --- a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp +++ b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp @@ -131,8 +131,7 @@ void tst_qqmlpropertycache::propertiesDerived() const QMetaObject *metaObject = object.metaObject(); QQmlRefPointer parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject)); - QQmlRefPointer cache(parentCache->copy()); - cache->append(&engine, object.metaObject()); + QQmlRefPointer 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 parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject)); - QQmlRefPointer cache(parentCache->copy()); - cache->append(&engine, object.metaObject()); + QQmlRefPointer 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 parentCache(new QQmlPropertyCache(&engine, &BaseObject::staticMetaObject)); - QQmlRefPointer cache(parentCache->copy()); - cache->append(&engine, object.metaObject()); + QQmlRefPointer cache(parentCache->copyAndAppend(&engine, object.metaObject())); QQmlPropertyData *data; QVERIFY(data = cache->property(QLatin1String("onSignalA"))); -- 1.7.2.5