aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquicktaphandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-08-31 13:42:22 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-08-31 13:59:30 +0000
commit35caa44992c32bd51e55b7b039df8fad7c945bc6 (patch)
treeca8c860c4d1cc55f17e83c476cdba75a86ee963c /src/quick/handlers/qquicktaphandler.cpp
parentbdb18e33e8b8c7e62514849378107a47a3667431 (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/qquicktaphandler.cpp')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index 45240a62ab..e97722d6b7 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -313,10 +313,10 @@ void QQuickTapHandler::setPressed(bool press, bool cancel, QQuickEventPoint *poi
}
}
-void QQuickTapHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabState stateChange, QQuickEventPoint *point)
+void QQuickTapHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEventPoint::GrabTransition transition, QQuickEventPoint *point)
{
- QQuickSinglePointHandler::onGrabChanged(grabber, stateChange, point);
- bool isCanceled = stateChange == QQuickEventPoint::CancelGrabExclusive || stateChange == QQuickEventPoint::CancelGrabPassive;
+ QQuickSinglePointHandler::onGrabChanged(grabber, transition, point);
+ bool isCanceled = transition == QQuickEventPoint::CancelGrabExclusive || transition == QQuickEventPoint::CancelGrabPassive;
if (grabber == this && (isCanceled || point->state() == QQuickEventPoint::Released))
setPressed(false, isCanceled, point);
}