diff options
Diffstat (limited to 'tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp')
-rw-r--r-- | tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp index 33b8742170..35883339d7 100644 --- a/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp +++ b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp @@ -1056,6 +1056,16 @@ void tst_QQuickRepeater::package() QCOMPARE(repeater2->count(), 1); QCOMPARE(repeater2->itemAt(0)->objectName(), "secondItem"); } + + { + QQmlComponent component(&engine, testFileUrl("package2.qml")); + QScopedPointer<QObject> root(component.create()); + QVERIFY(root != nullptr); + bool returnedValue = false; + // calling setup should not crash + QMetaObject::invokeMethod(root.get(), "setup", Q_RETURN_ARG(bool, returnedValue)); + QVERIFY(returnedValue); + } } void tst_QQuickRepeater::ownership() |