diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml new file mode 100644 index 0000000000..acd512a2be --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qobjectConnectionListExceptionHandling.qml @@ -0,0 +1,24 @@ +import QtQuick 2.0 + +Item { + id: root + property int first: 5 + property bool test: false + + Item { + id: exceptional + function exceptionalFunction() { + var obj = undefined; + var prop = undefined; + return obj[prop]; + } + } + + Component.onCompleted: { + root["firstChanged"].connect(exceptional.exceptionalFunction); + root["firstChanged"].connect(exceptional.exceptionalFunction); + root["firstChanged"].connect(exceptional.exceptionalFunction); + first = 6; + test = true; + } +} |