diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-04-27 01:00:20 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-04-27 01:00:20 +0200 |
commit | e282db62b1fca2ea133162bc6254595a42f4b861 (patch) | |
tree | afb0bb98f19153e25f7f3c6b200d579e731baeae /src/quick/items/qquickevents.cpp | |
parent | 1b30e8f94cc15352583e8e1f27139676683f62af (diff) | |
parent | 2f397aa15a13efbadf6c1bc378bb134ac1e655c5 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I280d42b8926c0cada1f35d322b80aaf2b0ef0a73
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r-- | src/quick/items/qquickevents.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 1be4bafe28..3343ea3fa7 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -1572,6 +1572,13 @@ void QQuickPointerTouchEvent::clearGrabbers() const { } } +Qt::TouchPointStates QQuickPointerTouchEvent::touchPointStates() const +{ + return m_event + ? static_cast<QTouchEvent*>(m_event)->touchPointStates() + : Qt::TouchPointStates(); +} + /*! Returns whether the given \a handler is the exclusive grabber of any touchpoint within this event. @@ -1586,17 +1593,17 @@ bool QQuickPointerTouchEvent::hasExclusiveGrabber(const QQuickPointerHandler *ha bool QQuickPointerTouchEvent::isPressEvent() const { - return static_cast<QTouchEvent*>(m_event)->touchPointStates() & Qt::TouchPointPressed; + return touchPointStates() & Qt::TouchPointPressed; } bool QQuickPointerTouchEvent::isUpdateEvent() const { - return static_cast<QTouchEvent*>(m_event)->touchPointStates() & (Qt::TouchPointMoved | Qt::TouchPointStationary); + return touchPointStates() & (Qt::TouchPointMoved | Qt::TouchPointStationary); } bool QQuickPointerTouchEvent::isReleaseEvent() const { - return static_cast<QTouchEvent*>(m_event)->touchPointStates() & Qt::TouchPointReleased; + return touchPointStates() & Qt::TouchPointReleased; } QVector<QPointF> QQuickPointerEvent::unacceptedPressedPointScenePositions() const |