diff options
Diffstat (limited to 'tests/auto/qml/qqmlfileselector/tst_qqmlfileselector.cpp')
-rw-r--r-- | tests/auto/qml/qqmlfileselector/tst_qqmlfileselector.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/auto/qml/qqmlfileselector/tst_qqmlfileselector.cpp b/tests/auto/qml/qqmlfileselector/tst_qqmlfileselector.cpp index 35c17ce588..4c99bcf9c8 100644 --- a/tests/auto/qml/qqmlfileselector/tst_qqmlfileselector.cpp +++ b/tests/auto/qml/qqmlfileselector/tst_qqmlfileselector.cpp @@ -86,19 +86,13 @@ void tst_qqmlfileselector::basicTestCached() void tst_qqmlfileselector::applicationEngineTest() { QQmlApplicationEngine engine; -QT_WARNING_PUSH -QT_WARNING_DISABLE_DEPRECATED - QQmlFileSelector* selector = QQmlFileSelector::get(&engine); -QT_WARNING_POP - QVERIFY(selector != nullptr); - selector->setExtraSelectors(QStringList() << "basic"); + engine.setExtraFileSelectors(QStringList() << "basic"); + engine.load(testFileUrl("basicTest.qml")); - QQmlComponent component(&engine, testFileUrl("basicTest.qml")); - QObject *object = component.create(); + QVERIFY(!engine.rootObjects().isEmpty()); + QObject *object = engine.rootObjects().at(0); QVERIFY(object != nullptr); QCOMPARE(object->property("value").toString(), QString("selected")); - - delete object; } QTEST_MAIN(tst_qqmlfileselector) |