diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 71f27db6b7..3ba0d59102 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2472,7 +2472,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To QWindow *window = e->window.data(); typedef QPair > StatesAndTouchPoints; QHash windowsNeedingEvents; - bool velocityOnly = false; + bool stationaryTouchPointChangedVelocity = false; for (int i = 0; i < e->points.count(); ++i) { QTouchEvent::TouchPoint touchPoint = e->points.at(i); @@ -2552,7 +2552,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To if (touchPoint.state() == Qt::TouchPointStationary) { if (touchInfo.touchPoint.velocity() != touchPoint.velocity()) { touchInfo.touchPoint.setVelocity(touchPoint.velocity()); - velocityOnly = true; + stationaryTouchPointChangedVelocity = true; } } else { touchInfo.touchPoint = touchPoint; @@ -2590,10 +2590,9 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To break; case Qt::TouchPointStationary: // don't send the event if nothing changed - if (velocityOnly) - eventType = QEvent::TouchUpdate; - else + if (!stationaryTouchPointChangedVelocity) continue; + Q_FALLTHROUGH(); default: eventType = QEvent::TouchUpdate; break;