aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-02-07 13:24:49 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-02-16 12:45:47 +0000
commitaf21677f473bce12ee7c725b1151ae794384ae76 (patch)
tree78a5bd403e25538cd59096005b7cd90cb79f8068 /src/quick/items/qquickevents.cpp
parent4e7041c65216ada4f5fb604a9df840152ba60317 (diff)
QQuickWindow: remove sendFilteredTouchEvent
The functionality is now completely assimilated into sendFilteredPointerEvent. Flickable can now steal the touch grab from a TapHandler child, for example: the TapHandler grabbed the eventpoint, whereas QQuickFlickable::childMouseEventFilter() was given a synthetic mouse event derived from the touchpoint which the eventpoint represented, and we fully follow through the consequences of that. If an Item filters a press event, avoid doing normal delivery to that same Item again. Change-Id: Icd9c88ab752f2b728f7d612504013c6dc72ff9fe Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r--src/quick/items/qquickevents.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index c3f6964ba6..0af19ff750 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -896,6 +896,10 @@ bool QQuickPointerMouseEvent::allPointsAccepted() const {
return m_mousePoint->isAccepted();
}
+bool QQuickPointerMouseEvent::allUpdatedPointsAccepted() const {
+ return m_mousePoint->state() == QQuickEventPoint::Pressed || m_mousePoint->isAccepted();
+}
+
bool QQuickPointerMouseEvent::allPointsGrabbed() const
{
return m_mousePoint->grabber() != nullptr;
@@ -941,6 +945,15 @@ bool QQuickPointerTouchEvent::allPointsAccepted() const {
return true;
}
+bool QQuickPointerTouchEvent::allUpdatedPointsAccepted() const {
+ for (int i = 0; i < m_pointCount; ++i) {
+ auto point = m_touchPoints.at(i);
+ if (point->state() != QQuickEventPoint::Pressed && !point->isAccepted())
+ return false;
+ }
+ return true;
+}
+
bool QQuickPointerTouchEvent::allPointsGrabbed() const
{
for (int i = 0; i < m_pointCount; ++i) {