summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-12-08 19:19:04 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2016-12-29 10:52:31 +0000
commit871314ced803afe0ac31033cfbd79fa4c1b18e3d (patch)
tree290bab4f0161c0880c1d7af8e68fd13b4ff42cee /tests/manual
parent70113ef66b245e58ce12e2a9d26268e2eaeb3a42 (diff)
DragHandler active property replaces dragging; same as grabbing
If a QQuickPointerSingleHandler grabs a point, it's definitely in the active state: doing something with the point. (The converse is not always true though: e.g. TapHandler can sometimes detect a tap without ever grabbing.) In DragHandler, the "dragging" property means the same as "active": we always grab when dragging, to be sure to get the updates. So the "dragging" property is removed because it's redundant. In QQuickPointerHandler we don't say that "wanting" an event is the same as being active, because 1) it won't necessarily grab right away and 2) every handler which was active should "want" the release event, yet it needs to setActive(false) as soon as it's done processing it. Change-Id: Ie010db54714a7914109da6469e79865f9a0a18e4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/pointer/content/Slider.qml2
-rw-r--r--tests/manual/pointer/joystick.qml2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/pointer/content/Slider.qml b/tests/manual/pointer/content/Slider.qml
index 363f6911d4..cd52dfac80 100644
--- a/tests/manual/pointer/content/Slider.qml
+++ b/tests/manual/pointer/content/Slider.qml
@@ -70,7 +70,7 @@ Item {
anchors.horizontalCenterOffset: 1
radius: 5
color: "#4400FFFF"
- visible: dragHandler.dragging
+ opacity: dragHandler.active ? 1 : 0
}
Image {
id: knob
diff --git a/tests/manual/pointer/joystick.qml b/tests/manual/pointer/joystick.qml
index 7959eaea42..bcc4564471 100644
--- a/tests/manual/pointer/joystick.qml
+++ b/tests/manual/pointer/joystick.qml
@@ -58,7 +58,7 @@ Rectangle {
}
states: [
State {
- when: dragHandler.dragging
+ when: dragHandler.active
AnchorChanges {
target: knob
anchors.horizontalCenter: undefined