aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-23 12:10:23 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-02 16:32:46 +0000
commitdb1034d093d76b4b6e66fcdd178800e0cf9d1005 (patch)
treed486a7b602a00e38dc504f70e86830683a8d04fe /tests
parent49a11e882059ee1729f776722e085dd21d378c36 (diff)
Move the engine pointer from the property cache to the VME meta object
This is where it belongs, and it makes the PropertyCache independent of the engine used. Task-number: QTBUG-61536 Change-Id: I21c2674ee3e2895abd2418764d140b154b47b868 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp
index 824fe445c0..ac1b76b9d2 100644
--- a/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp
+++ b/tests/auto/qml/qqmlpropertycache/tst_qqmlpropertycache.cpp
@@ -103,11 +103,10 @@ QQmlPropertyData *cacheProperty(QQmlPropertyCache *cache, const char *name)
void tst_qqmlpropertycache::properties()
{
QQmlEngine engine;
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
DerivedObject object;
const QMetaObject *metaObject = object.metaObject();
- QQmlRefPointer<QQmlPropertyCache> cache(new QQmlPropertyCache(v4, metaObject));
+ QQmlRefPointer<QQmlPropertyCache> cache(new QQmlPropertyCache(metaObject));
QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "propertyA")));
@@ -126,11 +125,10 @@ void tst_qqmlpropertycache::properties()
void tst_qqmlpropertycache::propertiesDerived()
{
QQmlEngine engine;
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
DerivedObject object;
const QMetaObject *metaObject = object.metaObject();
- QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(v4, &BaseObject::staticMetaObject));
+ QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(&BaseObject::staticMetaObject));
QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copyAndAppend(object.metaObject()));
QQmlPropertyData *data;
@@ -150,11 +148,10 @@ void tst_qqmlpropertycache::propertiesDerived()
void tst_qqmlpropertycache::methods()
{
QQmlEngine engine;
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
DerivedObject object;
const QMetaObject *metaObject = object.metaObject();
- QQmlRefPointer<QQmlPropertyCache> cache(new QQmlPropertyCache(v4, metaObject));
+ QQmlRefPointer<QQmlPropertyCache> cache(new QQmlPropertyCache(metaObject));
QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "slotA")));
@@ -185,11 +182,10 @@ void tst_qqmlpropertycache::methods()
void tst_qqmlpropertycache::methodsDerived()
{
QQmlEngine engine;
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
DerivedObject object;
const QMetaObject *metaObject = object.metaObject();
- QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(v4, &BaseObject::staticMetaObject));
+ QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(&BaseObject::staticMetaObject));
QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copyAndAppend(object.metaObject()));
QQmlPropertyData *data;
@@ -221,11 +217,10 @@ void tst_qqmlpropertycache::methodsDerived()
void tst_qqmlpropertycache::signalHandlers()
{
QQmlEngine engine;
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
DerivedObject object;
const QMetaObject *metaObject = object.metaObject();
- QQmlRefPointer<QQmlPropertyCache> cache(new QQmlPropertyCache(v4, metaObject));
+ QQmlRefPointer<QQmlPropertyCache> cache(new QQmlPropertyCache(metaObject));
QQmlPropertyData *data;
QVERIFY((data = cacheProperty(cache, "onSignalA")));
@@ -250,11 +245,10 @@ void tst_qqmlpropertycache::signalHandlers()
void tst_qqmlpropertycache::signalHandlersDerived()
{
QQmlEngine engine;
- QV4::ExecutionEngine *v4 = QV8Engine::getV4(&engine);
DerivedObject object;
const QMetaObject *metaObject = object.metaObject();
- QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(v4, &BaseObject::staticMetaObject));
+ QQmlRefPointer<QQmlPropertyCache> parentCache(new QQmlPropertyCache(&BaseObject::staticMetaObject));
QQmlRefPointer<QQmlPropertyCache> cache(parentCache->copyAndAppend(object.metaObject()));
QQmlPropertyData *data;