diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml new file mode 100644 index 0000000..45c4f73 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml @@ -0,0 +1,18 @@ +import Qt.test 1.0 +import Qt 4.6 + +MyQmlObject { + property int test: 0 + + id: root + + Script { + function testFunction() { + test++; + } + } + + Component.onCompleted: root.argumentSignal.connect(testFunction); + + onBasicSignal: root.argumentSignal.disconnect(testFunction); +} |