From 871314ced803afe0ac31033cfbd79fa4c1b18e3d Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 8 Dec 2016 19:19:04 +0100 Subject: DragHandler active property replaces dragging; same as grabbing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/manual/pointer/content/Slider.qml | 2 +- tests/manual/pointer/joystick.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/manual') 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 -- cgit v1.2.3