summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeconnection/data
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-23 01:52:06 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-23 01:52:06 (GMT)
commit92e7f06b3690e6e39af8fac7af6c101b416b0f4c (patch)
treee8ad882eb106b083cfe70b015f8aeaef15f04ca3 /tests/auto/declarative/qdeclarativeconnection/data
parentaf3c75a63e9b7dd9725443a8e23114f825c6d12b (diff)
downloadQt-92e7f06b3690e6e39af8fac7af6c101b416b0f4c.zip
Qt-92e7f06b3690e6e39af8fac7af6c101b416b0f4c.tar.gz
Qt-92e7f06b3690e6e39af8fac7af6c101b416b0f4c.tar.bz2
Don't crash if Connections::target is changed by one of its signal handlers
Reviewed-by: Michael Brasser
Diffstat (limited to 'tests/auto/declarative/qdeclarativeconnection/data')
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml
new file mode 100644
index 0000000..bb9a3bc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml
@@ -0,0 +1,25 @@
+import Qt 4.7
+
+Item {
+ Component {
+ id: item1
+ Item {
+ objectName: "item1"
+ }
+ }
+ Component {
+ id: item2
+ Item {
+ objectName: "item2"
+ }
+ }
+ Loader {
+ id: loader
+ sourceComponent: item1
+ }
+ Connections {
+ objectName: "connections"
+ target: loader.item
+ onWidthChanged: loader.sourceComponent = item2
+ }
+}