path: root/src/widgets
diff options
authorLaszlo Agocs <>2011-11-30 19:19:27 +0200
committerQt by Nokia <>2011-12-12 12:28:29 +0100
commit6f1c4fb342dd94b21df8f5c2bbdfa4b9f5a09c4e (patch)
tree7d1caeed412eb527cf12e68ecde2b992c4678113 /src/widgets
parent67be01ae5048138e894fa8d3eb0abe93c5699048 (diff)
Store the primary status in the touch point flags.
For some reason the primary bit has previously been encoded in the touch point state, even though it has nothing to do with the regular states like Pressed, Released, etc. The value is now stored in the recently introduced flags member of the touch points. This also reduces the need for error-prone internal masking of the state value. The structure used by QWindowSystemInterface::handleTouchEvent also becomes cleaner because the primary status can now be set in the flags member and the isPrimary bool can be dropped. Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f Reviewed-by: Samuel Rødal <>
Diffstat (limited to 'src/widgets')
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index e6e8a8eab4..c94c48e28b 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -5316,8 +5316,6 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[];
maskAndPoints.first |= touchPoint.state();
- if (touchPoint.isPrimary())
- maskAndPoints.first |= Qt::TouchPointPrimary;
@@ -5332,7 +5330,7 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
QEvent::Type eventType;
- switch (it.value().first & Qt::TouchPointStateMask) {
+ switch (it.value().first) {
case Qt::TouchPointPressed:
eventType = QEvent::TouchBegin;