diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-16 16:25:06 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-16 16:25:06 +0100 |
commit | 1d333d3375874efb8d37df37dc5ef561573794ad (patch) | |
tree | 2d8c995f64c05c84c1fcceb2c5cb40fcae69855f /tests/auto/qml/qqmlmetatype | |
parent | b106d86c433706928b0b0c206a0d9f831681e1bf (diff) | |
parent | e79a2658cde899d6ee11ec3c0d0a3768eb2c864b (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
Diffstat (limited to 'tests/auto/qml/qqmlmetatype')
-rw-r--r-- | tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp index 76185a97e0..72295044a5 100644 --- a/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp +++ b/tests/auto/qml/qqmlmetatype/tst_qqmlmetatype.cpp @@ -307,7 +307,7 @@ void tst_qqmlmetatype::compositeType() //Loading the test file also loads all composite types it imports QQmlComponent c(&engine, testFileUrl("testImplicitComposite.qml")); - QObject* obj = c.create(); + QScopedPointer<QObject> obj(c.create()); QVERIFY(obj); QQmlType type = QQmlMetaType::qmlType(QString("ImplicitType"), QString(""), 1, 0); @@ -324,7 +324,7 @@ void tst_qqmlmetatype::externalEnums() qmlRegisterSingletonType<ExternalEnums>("x.y.z", 1, 0, "ExternalEnums", ExternalEnums::create); QQmlComponent c(&engine, testFileUrl("testExternalEnums.qml")); - QObject *obj = c.create(); + QScopedPointer<QObject> obj(c.create()); QVERIFY(obj); QVariant a = obj->property("a"); QCOMPARE(a.type(), QVariant::Int); @@ -552,7 +552,8 @@ void tst_qqmlmetatype::unregisterAttachedProperties() QCOMPARE(attachedType.attachedPropertiesType(QQmlEnginePrivate::get(&e)), attachedType.metaObject()); - QVERIFY(c.create()); + QScopedPointer<QObject> obj(c.create()); + QVERIFY(obj); } qmlClearTypeRegistrations(); @@ -571,7 +572,8 @@ void tst_qqmlmetatype::unregisterAttachedProperties() QCOMPARE(attachedType.attachedPropertiesType(QQmlEnginePrivate::get(&e)), attachedType.metaObject()); - QVERIFY(c.create()); + QScopedPointer<QObject> obj(c.create()); + QVERIFY(obj); } } |