diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 47b7a6640c..e764ae783c 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -306,6 +306,7 @@ private slots: void jsOwnedObjectsDeletedOnEngineDestroy(); void numberParsing(); void stringParsing(); + void qtbug_32801(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -7288,6 +7289,18 @@ void tst_qqmlecmascript::stringParsing() } } +void tst_qqmlecmascript::qtbug_32801() +{ + QQmlComponent component(&engine, testFileUrl("qtbug_32801.qml")); + + QScopedPointer<QObject> obj(component.create()); + QVERIFY(obj != 0); + + // do not crash when a QML signal is connected to a non-void slot + connect(obj.data(), SIGNAL(testSignal(QString)), obj.data(), SLOT(slotWithReturnValue(QString))); + QVERIFY(QMetaObject::invokeMethod(obj.data(), "emitTestSignal")); +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |