summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-05 08:04:37 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-05 08:04:37 (GMT)
commitdcd17fa7b77cb6adfb8b21ea90c113915cab9bd5 (patch)
tree37dca0549529fe43b6e98af3adab133a9f5991d1 /tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
parent4a6154ec912d5b84a556aa731c5b7de8f758ba3d (diff)
downloadQt-dcd17fa7b77cb6adfb8b21ea90c113915cab9bd5.zip
Qt-dcd17fa7b77cb6adfb8b21ea90c113915cab9bd5.tar.gz
Qt-dcd17fa7b77cb6adfb8b21ea90c113915cab9bd5.tar.bz2
Add support for QtScript connect/disconnect syntax in QML
This support was accidentally removed as a consequence of 4a665ff5da05860f5eb46e3982ef3d8163a6cf59. QTBUG-8001
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
new file mode 100644
index 0000000..342f24a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+import Qt 4.6
+
+MyQmlObject {
+ property int test: 0
+
+ id: root
+
+ Script {
+ function testFunction() {
+ test++;
+ }
+ function otherFunction() {
+ }
+ }
+
+ Component.onCompleted: root.argumentSignal.connect(testFunction);
+
+ onBasicSignal: root.argumentSignal.disconnect(otherFunction);
+}