diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp index edb9bdb51d..9c381f0174 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp @@ -566,7 +566,7 @@ void tst_qmltyperegistrar::uncreatable() qmlRegisterTypesAndRevisions("A", 1); } -void tst_qmltyperegistrar::singletonVesions() +void tst_qmltyperegistrar::singletonVersions() { QQmlEngine engine; qmlRegisterTypesAndRevisions("A", 0); @@ -581,7 +581,7 @@ void tst_qmltyperegistrar::singletonVesions() " property QtObject v1: SingletonVesion1\n" "}", QUrl()); QVERIFY2(c.isReady(), qPrintable(c.errorString())); - auto obj = c.create(); + QScopedPointer obj(c.create()); QVERIFY2(!obj->property("v0").isNull(), "Singleton version 0 is not registered"); QVERIFY2(!obj->property("v1").isNull(), "Singleton version 1 is not registered"); } diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h index fb3d4dd2ac..0011fef10e 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h @@ -593,7 +593,7 @@ private slots: void methodReturnType(); void hasIsConstantInParameters(); void uncreatable(); - void singletonVesions(); + void singletonVersions(); #ifdef QT_QUICK_LIB void foreignRevisionedProperty();