aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-07-12 12:00:22 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-12 06:33:06 +0200
commit3b23b298fbf9e2b80b96e662215154e55c319871 (patch)
tree7a42cc5f676159abed901441743a78d5874f109c /tests/auto/qml
parent0e2fbb89161ce6bd753ad9f84a5a9ed466c763f3 (diff)
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 <michael.brasser@nokia.com>
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qml.pro1
-rw-r--r--tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp9
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro
index 2c5d367b88..e24e30d2f9 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 b702623fee..de3c0412fb 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<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")));