From b53ea019c4e0ab50bc2c505d64d21e9fe1f32266 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 12 Jul 2016 18:12:42 +0200 Subject: Don't store Qt::TouchPointState in 4 bits It's not enough on Windows: it gets sign-extended, so 0x08 becomes -8 as an int, in comparisons. The result was that touchpoints were never released. Anyway we hardly have to worry about this now that we're not copying the event points. Change-Id: I0d47a0974a9cf5bc9a090a15948d112df32403eb Reviewed-by: Frederik Gladhorn --- src/quick/items/qquickevents_p_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index af3e385ce6..04f43667a7 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -317,7 +317,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickEventPoint : public QObject Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted) public: - QQuickEventPoint() : QObject(), m_pointId(0), m_valid(false), m_accept(false), m_state(Qt::TouchPointReleased) + QQuickEventPoint() : QObject(), m_pointId(0), m_state(Qt::TouchPointReleased), m_valid(false), m_accept(false) { Q_UNUSED(m_reserved); } @@ -343,10 +343,10 @@ public: private: QPointF m_scenePos; quint64 m_pointId; + Qt::TouchPointState m_state; bool m_valid : 1; bool m_accept : 1; - Qt::TouchPointState m_state : 4; - int m_reserved : 26; + int m_reserved : 30; }; class Q_QUICK_PRIVATE_EXPORT QQuickEventTouchPoint : public QQuickEventPoint -- cgit v1.2.3