diff options
author | Jan Arve Saether <jan-arve.saether@qt.io> | 2017-02-21 17:51:34 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-22 11:59:47 +0000 |
commit | 3a6a6d96ec443e66e3a07e9d16cd50b6c5d8c599 (patch) | |
tree | 81d60697386016a66714406ed5d1d7f14369f2ed /src/quick/items/qquickevents.cpp | |
parent | 013032ae44c5118ae2d096d0dba47bc4114d96d1 (diff) |
Change QQuickEventPoint::pointId to be plain int
After change 8984c42d1779b13fd29d95274af2d01d32528e52 in qtbase, a
QTouchEvent::TouchPoint::id is already guaranteed to be unique across
devices. We therefore don't need a larger value space for
QQuickEventPoint::pointId, since that value is the same value as we got
from the QTouchEvent
Change-Id: I044630a812706f3c114bb28cffb29536f9feeeb3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r-- | src/quick/items/qquickevents.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index c78df999e8..a7ab0f01b0 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -531,7 +531,7 @@ QQuickPointerDevice *QQuickPointerDevice::tabletDevice(qint64 id) return nullptr; } -void QQuickEventPoint::reset(Qt::TouchPointState state, const QPointF &scenePos, quint64 pointId, ulong timestamp, const QVector2D &velocity) +void QQuickEventPoint::reset(Qt::TouchPointState state, const QPointF &scenePos, int pointId, ulong timestamp, const QVector2D &velocity) { m_scenePos = scenePos; if (m_pointId != pointId) { @@ -1146,15 +1146,15 @@ QMouseEvent *QQuickPointerTouchEvent::syntheticMouseEvent(int pointID, QQuickIte \l {QQuickEventPoint::pointId}{pointId}. Returns nullptr if there is no point with that ID. - \fn QQuickPointerEvent::pointById(quint64 pointId) const + \fn QQuickPointerEvent::pointById(int pointId) const */ -QQuickEventPoint *QQuickPointerMouseEvent::pointById(quint64 pointId) const { +QQuickEventPoint *QQuickPointerMouseEvent::pointById(int pointId) const { if (m_mousePoint && pointId == m_mousePoint->pointId()) return m_mousePoint; return nullptr; } -QQuickEventPoint *QQuickPointerTouchEvent::pointById(quint64 pointId) const { +QQuickEventPoint *QQuickPointerTouchEvent::pointById(int pointId) const { auto it = std::find_if(m_touchPoints.constBegin(), m_touchPoints.constEnd(), [pointId](const QQuickEventTouchPoint *tp) { return tp->pointId() == pointId; } ); if (it != m_touchPoints.constEnd()) |