diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-31 13:42:22 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-08-31 13:59:30 +0000 |
commit | 35caa44992c32bd51e55b7b039df8fad7c945bc6 (patch) | |
tree | ca8c860c4d1cc55f17e83c476cdba75a86ee963c /src/quick/handlers/qquickdraghandler.cpp | |
parent | bdb18e33e8b8c7e62514849378107a47a3667431 (diff) |
Rename QQEventPoint::GrabState to GrabTransition
This enum represents a transient state transition, and only sometimes
corresponds to the current grab state of an event point. For example
after exclusive grab has been canceled, the current state is that
there is no exclusive grab: it doesn't make sense to remember that the
way it got there was by cancellation. There was an idea to add a
grabState property, but not all values would be eligible. An
EventPoint can be exclusively grabbed by one item or handler at a
time, and by multiple passive grabbers at the same time, so even a
Q_FLAG would not fully express all possible states. Besides, there is
already an exclusiveGrabber property, and we could add a
passiveGrabbers list property if we had a real need. So adding a
grabState property seems unlikely, and therefore is not a good enough
reason to keep this enum named as GrabState.
Change-Id: Ie37742b4bd431a7e51910d79a7223fba9a6bd848
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickdraghandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickdraghandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index ffdaa909dd..b8f08639ef 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -109,10 +109,10 @@ QPointF QQuickDragHandler::targetCentroidPosition() return pos; } -void QQuickDragHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point) +void QQuickDragHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabTransition transition, QQuickEventPoint *point) { - QQuickMultiPointHandler::onGrabChanged(grabber, stateChange, point); - if (grabber == this && stateChange == QQuickEventPoint::GrabExclusive) { + QQuickMultiPointHandler::onGrabChanged(grabber, transition, point); + if (grabber == this && transition == QQuickEventPoint::GrabExclusive) { // In case the grab got handed over from another grabber, we might not get the Press. if (!m_pressedInsideTarget) { if (target()) |