aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconnections/data/invalidTarget.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlconnections/data/invalidTarget.qml')
-rw-r--r--tests/auto/qml/qqmlconnections/data/invalidTarget.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconnections/data/invalidTarget.qml b/tests/auto/qml/qqmlconnections/data/invalidTarget.qml
new file mode 100644
index 0000000000..23599649ec
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/invalidTarget.qml
@@ -0,0 +1,31 @@
+import QtQml
+
+QtObject {
+ id: root
+ objectName: button.objectName
+
+ property QtObject b: QtObject {
+ objectName: "button"
+ id: button
+ signal clicked
+ }
+
+ property Connections c: Connections {
+ id: connections
+ target: null
+ function onClicked() { button.destroy(); }
+ }
+
+ property Timer t: Timer {
+ interval: 10
+ running: true
+ onTriggered: {
+ root.objectName = connections.target.objectName
+ }
+ }
+
+ Component.onCompleted: {
+ connections.target = button;
+ button.clicked()
+ }
+}