diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-01-20 12:55:54 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-01-20 12:55:54 +0100 |
commit | bc29da5c224d277dfa94ae4e188df1db325ae83a (patch) | |
tree | 19eef227a11ab099fd04b909d326201ae7df7d8d /tests/auto/controls/data/tst_switchdelegate.qml | |
parent | 5934c9670eaa6f0464c45857d72bcebf64902cc4 (diff) | |
parent | c1b1e9a69a5770a59d0a4e59650c6487b9cd5439 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/quicktemplates2/qquickswitch.cpp
src/quicktemplates2/qquickswitchdelegate.cpp
tests/auto/controls/data/tst_dialogbuttonbox.qml
tests/auto/controls/data/tst_toolbutton.qml
Change-Id: I1da1d6de83c1d9ac854dfce1d6c9d6ba2c460404
Diffstat (limited to 'tests/auto/controls/data/tst_switchdelegate.qml')
-rw-r--r-- | tests/auto/controls/data/tst_switchdelegate.qml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_switchdelegate.qml b/tests/auto/controls/data/tst_switchdelegate.qml index 3f591602..490afd51 100644 --- a/tests/auto/controls/data/tst_switchdelegate.qml +++ b/tests/auto/controls/data/tst_switchdelegate.qml @@ -181,6 +181,23 @@ TestCase { compare(control.pressed, false) verify(spy.success) + // release in the middle + spy.expectedSequence = [["pressedChanged", { "pressed": true, "checked": false }], + "pressed"] + mousePress(control.indicator, 0, 0, Qt.LeftButton) + compare(control.pressed, true) + verify(spy.success) + mouseMove(control.indicator, control.indicator.width / 2 - 1, 0) + compare(control.pressed, true) + spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }], + "released", + "clicked"] + mouseRelease(control.indicator, control.indicator.width / 2 - 1, 0, Qt.LeftButton) + compare(control.checked, false) + compare(control.pressed, false) + tryCompare(control, "position", 0) // QTBUG-57944 + verify(spy.success) + // right button spy.expectedSequence = [] mousePress(control, control.width / 2, control.height / 2, Qt.RightButton) |