From 029d119f4c0e13afbcbd5a0724af7d158acaf8e2 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 30 Apr 2015 16:51:49 +0200 Subject: ControlSpy: Accept a list of signals to spy on This API is cleaner than having to connect to each signal handler namually. We solve the 'pressed' signal problem by connecting to the other signal accessor, namely 'onPressed'. And we do so for all signals. We also lay foundation to capture the signal parameters as each signal is emitted. What we may do with those values is not clear yet. Auto-tests updated accordingly. Change-Id: Ieda96a43072ca7dff2b183e07f6f67aa49c8cf5d Reviewed-by: Mitch Curtis --- tests/auto/controls/data/tst_checkbox.qml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'tests/auto/controls/data/tst_checkbox.qml') diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml index 734f5464..e3414595 100644 --- a/tests/auto/controls/data/tst_checkbox.qml +++ b/tests/auto/controls/data/tst_checkbox.qml @@ -56,16 +56,9 @@ TestCase { id: control property ControlSpy spy: ControlSpy { - id: spy target: control + signals: ["pressed", "released", "canceled", "clicked", "pressedChanged", "checkedChanged"] } - - onPressed: spy.checkSignal("pressed") - onReleased: spy.checkSignal("released") - onCanceled: spy.checkSignal("canceled") - onClicked: spy.checkSignal("clicked") - onPressedChanged: spy.checkSignal("pressedChanged") - onCheckedChanged: spy.checkSignal("checkedChanged") } } @@ -147,7 +140,6 @@ TestCase { function test_mouse() { var control = checkBox.createObject(testCase) - // check control.spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }], "pressed"] -- cgit v1.2.3