diff options
Diffstat (limited to 'tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp')
-rw-r--r-- | tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp index fe45495f74..22e9724c61 100644 --- a/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp +++ b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp @@ -54,6 +54,7 @@ private slots: void enableDisable_QTBUG_36350(); void disabledAtStart(); void clearImplicitTarget(); + void onWithoutASignal(); private: QQmlEngine engine; @@ -397,6 +398,15 @@ void tst_qqmlconnections::clearImplicitTarget() delete item; } +void tst_qqmlconnections::onWithoutASignal() +{ + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("connection-no-signal-name.qml")); + QVERIFY(c.isError()); // Cannot assign to non-existent property "on" expected + QScopedPointer<QQuickItem> item(qobject_cast<QQuickItem*>(c.create())); + QVERIFY(item == nullptr); // should parse error, and not give us an item (or crash). +} + QTEST_MAIN(tst_qqmlconnections) #include "tst_qqmlconnections.moc" |