aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpointerhandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-04-26 15:28:57 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-06-27 15:30:57 +0000
commita1adcf34f8784d05467cf3598064a3e83842fdc0 (patch)
treef091e442fc35a28f5a50200dec61c10dc33b8831 /src/quick/handlers/qquickpointerhandler.cpp
parent07d302522becc9862c044e3c173e48a3112b6868 (diff)
PointerHandler.grabChanged signal: add stateChange parameter
To make grabChanged signal useful, it's necessary to know whether the Pointer Handler has acquired or lost the grab. This patch fixes that. Task-number: QTBUG-68074 Change-Id: I29398d2bb5b27b8541197f23c3043ee86cad7c76 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerhandler.cpp')
-rw-r--r--src/quick/handlers/qquickpointerhandler.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/quick/handlers/qquickpointerhandler.cpp b/src/quick/handlers/qquickpointerhandler.cpp
index a0325dd0c6..4539aa221c 100644
--- a/src/quick/handlers/qquickpointerhandler.cpp
+++ b/src/quick/handlers/qquickpointerhandler.cpp
@@ -124,8 +124,7 @@ void QQuickPointerHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEv
}
if (wasCanceled)
emit canceled(point);
- else
- emit grabChanged(point);
+ emit grabChanged(stateChange, point);
}
}
@@ -456,10 +455,13 @@ void QQuickPointerHandler::handlePointerEventImpl(QQuickPointerEvent *event)
*/
/*!
- \qmlsignal QtQuick::PointerHandler::grabChanged(EventPoint point)
+ \qmlsignal QtQuick::PointerHandler::grabChanged(GrabState stateChange, EventPoint point)
- This signal is emitted when this handler has acquired or relinquished a
- passive or exclusive grab of the given \a point.
+ This signal is emitted when the grab has changed in some way which is
+ relevant to this handler.
+
+ The \a stateChange (verb) tells what happened.
+ The \a point (object) is the point that was grabbed or ungrabbed.
*/
/*!