diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 18:46:38 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 19:02:37 +0200 |
commit | c2f8b9535d34da6948ccf45b7d5fd90de2f1bc9e (patch) | |
tree | c6f7e058a985d7c18b51cadc76283caf555071c9 /tests/auto/qml/qqmlnotifier | |
parent | 9e633bbda7608ac0231809e2a6a97ae8f2d849d6 (diff) | |
parent | 803f18f02e5609a1ca00a5b78ea6d3613d44e1a0 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Removed dependencies.yaml because we don't use it yet in wip/cmake.
Fixed conflict in qmlcachegen.cpp.
Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
Diffstat (limited to 'tests/auto/qml/qqmlnotifier')
-rw-r--r-- | tests/auto/qml/qqmlnotifier/data/connectnotify.qml | 3 | ||||
-rw-r--r-- | tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qml/qqmlnotifier/data/connectnotify.qml b/tests/auto/qml/qqmlnotifier/data/connectnotify.qml index 35226ee5ab..34e70e6afe 100644 --- a/tests/auto/qml/qqmlnotifier/data/connectnotify.qml +++ b/tests/auto/qml/qqmlnotifier/data/connectnotify.qml @@ -3,6 +3,7 @@ import Test 1.0 Item { id: root + required property ExportedClass exportedObject ExportedClass { id: exportedClass objectName: "exportedClass" @@ -22,7 +23,7 @@ Item { } property int foo: exportedClass.qmlObjectProp - property int baz: _exportedObject.cppObjectProp + property int baz: exportedObject.cppObjectProp // v4 bindings that could share a subscription. They don't, though, and the code // relies on that diff --git a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp index de762d66c5..836b94ad45 100644 --- a/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp +++ b/tests/auto/qml/qqmlnotifier/tst_qqmlnotifier.cpp @@ -185,8 +185,7 @@ void tst_qqmlnotifier::createObjects() QQmlComponent component(&engine, testFileUrl("connectnotify.qml")); exportedObject = new ExportedClass(); exportedObject->setObjectName("exportedObject"); - engine.rootContext()->setContextProperty("_exportedObject", exportedObject); - root = component.create(); + root = component.createWithInitialProperties({{"exportedObject", QVariant::fromValue(exportedObject)}}); QVERIFY(root != nullptr); exportedClass = qobject_cast<ExportedClass *>( @@ -324,12 +323,12 @@ void tst_qqmlnotifier::lotsOfBindings() TestObject o; QQmlEngine *e = new QQmlEngine; - e->rootContext()->setContextProperty(QStringLiteral("test"), &o); + qmlRegisterSingletonInstance("Test", 1, 0, "Test", &o); QList<QQmlComponent *> components; for (int i = 0; i < 20000; ++i) { QQmlComponent *component = new QQmlComponent(e); - component->setData("import QtQuick 2.0; Item { width: test.a; }", QUrl()); + component->setData("import QtQuick 2.0; import Test 1.0; Item {width: Test.a; }", QUrl()); component->create(e->rootContext()); components.append(component); } |