aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-09-16 22:22:24 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-09-24 23:09:23 +0200
commit05dc0a387ae324f2d6f3d7e633a0a49473f6957a (patch)
tree6bdfeaa2e700fdab6c5091993928fbf45419eb25 /src/quick/items/qquickitem.cpp
parent8e3f40f8c62e94ef475f1c48d8f14df725b78a79 (diff)
Get rid of QMutableEventPoint::stationaryWithModifiedProperty
Omitting stationary points from touch events is such a marginal optimization that this code probably isn't worth maintaining. It wasn't implemented correctly this time either, according to the tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure() test. Task-number: QTBUG-77142 Change-Id: I1ccc8ffe0451d6417add2b03c063ac1aebe36e8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 8e6bb0f224..de43f2fb7d 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -8382,7 +8382,6 @@ QTouchEvent QQuickItemPrivate::localizedTouchEvent(const QTouchEvent *event, boo
QEventPoint::States eventStates;
bool anyPressOrReleaseInside = false;
- bool anyStationaryWithModifiedPropertyInside = false;
bool anyGrabber = false;
for (auto &p : event->points()) {
if (p.isAccepted())
@@ -8415,8 +8414,6 @@ QTouchEvent QQuickItemPrivate::localizedTouchEvent(const QTouchEvent *event, boo
anyPressOrReleaseInside = true;
QEventPoint pCopy(p);
QMutableEventPoint mut = QMutableEventPoint::from(pCopy);
- if (isInside && mut.stationaryWithModifiedProperty())
- anyStationaryWithModifiedPropertyInside = true;
eventStates |= p.state();
mut.setPosition(localPos);
touchPoints << mut;
@@ -8424,8 +8421,7 @@ QTouchEvent QQuickItemPrivate::localizedTouchEvent(const QTouchEvent *event, boo
// Now touchPoints will have only points which are inside the item.
// But if none of them were just pressed inside, and the item has no other reason to care, ignore them anyway.
- if ((eventStates == QEventPoint::State::Stationary && !anyStationaryWithModifiedPropertyInside) ||
- touchPoints.isEmpty() || (!anyPressOrReleaseInside && !anyGrabber && !isFiltering))
+ if (touchPoints.isEmpty() || (!anyPressOrReleaseInside && !anyGrabber && !isFiltering))
return QTouchEvent(QEvent::None);
// if all points have the same state, set the event type accordingly