diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2014-09-03 20:42:04 +0200 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2014-09-03 22:22:55 +0200 |
commit | 222f22f626d8ae92500da440a4fb5f429da52407 (patch) | |
tree | 7b10dc7d7a63ff0cb99629fc63e0ea3ff690a044 /tests/auto/quick/qquickmousearea/data | |
parent | 0de680c8e8fab36e386dca35e5008ffaa27e8ef6 (diff) |
MouseArea: Fix cancelling the double click when the windows loses focus
Without this, the next click is not received after the windows loses
focus while we double clicked but not released the mouse.
This may happen if the onDoubleClicked opens a new window
Change-Id: I86742de2bb1ea4c9657b9d5e90472d093293177d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'tests/auto/quick/qquickmousearea/data')
-rw-r--r-- | tests/auto/quick/qquickmousearea/data/pressedCanceled.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickmousearea/data/pressedCanceled.qml b/tests/auto/quick/qquickmousearea/data/pressedCanceled.qml index 14630b8962..9079cbdfce 100644 --- a/tests/auto/quick/qquickmousearea/data/pressedCanceled.qml +++ b/tests/auto/quick/qquickmousearea/data/pressedCanceled.qml @@ -7,7 +7,9 @@ Rectangle { width: 320; height: 240 property bool pressed:mouse.pressed property bool canceled: false - property bool released: false + property int clicked: 0 + property int doubleClicked: 0 + property int released: 0 property alias secondWindow: secondWindow Window { @@ -20,6 +22,8 @@ Rectangle { anchors.fill: parent onPressed: { root.canceled = false } onCanceled: {root.canceled = true} - onReleased: {root.released = true; root.canceled = false} + onReleased: {root.released++; root.canceled = false} + onClicked: {root.clicked++} + onDoubleClicked: {root.doubleClicked++} } } |