summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativestates/data
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-05-11 01:07:23 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-05-11 01:07:23 (GMT)
commit129940723d9145a4380f7e44c06cbaa88ee4053b (patch)
tree7d7849879d084c667cc44c81f66464a3356e802c /tests/auto/declarative/qdeclarativestates/data
parent35bc65ecf89ccc14f2e949f2d2881e899f7c4165 (diff)
downloadQt-129940723d9145a4380f7e44c06cbaa88ee4053b.zip
Qt-129940723d9145a4380f7e44c06cbaa88ee4053b.tar.gz
Qt-129940723d9145a4380f7e44c06cbaa88ee4053b.tar.bz2
Correct ownership of signal handlers in state changes.
When a state uses override, we may apply the same replacesignalhandler on top of itself. Make sure we update ownership accordingly. Task-number: QTBUG-10523
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates/data')
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
new file mode 100644
index 0000000..2215ee4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
@@ -0,0 +1,24 @@
+import Qt 4.7
+
+Rectangle {
+ id: myRect
+ width: 400
+ height: 400
+
+ states: [
+ State {
+ name: "state1"
+ PropertyChanges {
+ target: myRect
+ onHeightChanged: console.log("Hello World")
+ color: "green"
+ }
+ },
+ State {
+ name: "state2"; extend: "state1"
+ PropertyChanges {
+ target: myRect
+ color: "red"
+ }
+ }]
+}