aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpincharea.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-07-13 13:40:04 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-07-15 20:52:59 +0200
commitc0e72e34863a5628c51e5c3bb42bcc455c310340 (patch)
tree71e661d2c54258a756087627227f4feb39521bae /src/quick/items/qquickpincharea.cpp
parent151f58dc29f4b53fb46a96d773aee8641593e5c7 (diff)
Replace QTouchEvent::TouchPoint with QEventPoint
It's a cosmetic change at this time, because we have declared using TouchPoint = QEventPoint; Also replace Qt::TouchPointState enum with QEventPoint::State. Task-number: QTBUG-72173 Change-Id: Ife017aa98801c28abc6cccd106f47a95421549de Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quick/items/qquickpincharea.cpp')
-rw-r--r--src/quick/items/qquickpincharea.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp
index 3051e4b788..c021e5181c 100644
--- a/src/quick/items/qquickpincharea.cpp
+++ b/src/quick/items/qquickpincharea.cpp
@@ -336,7 +336,7 @@ void QQuickPinchArea::touchEvent(QTouchEvent *event)
case QEvent::TouchUpdate:
d->touchPoints.clear();
for (int i = 0; i < event->touchPoints().count(); ++i) {
- if (!(event->touchPoints().at(i).state() & Qt::TouchPointReleased)) {
+ if (!(event->touchPoints().at(i).state() & QEventPoint::State::Released)) {
d->touchPoints << event->touchPoints().at(i);
}
}
@@ -465,13 +465,13 @@ void QQuickPinchArea::updatePinch()
return;
}
- QTouchEvent::TouchPoint touchPoint1 = d->touchPoints.at(0);
- QTouchEvent::TouchPoint touchPoint2 = d->touchPoints.at(d->touchPoints. count() >= 2 ? 1 : 0);
+ QEventPoint touchPoint1 = d->touchPoints.at(0);
+ QEventPoint touchPoint2 = d->touchPoints.at(d->touchPoints. count() >= 2 ? 1 : 0);
- if (touchPoint1.state() == Qt::TouchPointPressed)
+ if (touchPoint1.state() == QEventPoint::State::Pressed)
d->sceneStartPoint1 = touchPoint1.scenePosition();
- if (touchPoint2.state() == Qt::TouchPointPressed)
+ if (touchPoint2.state() == QEventPoint::State::Pressed)
d->sceneStartPoint2 = touchPoint2.scenePosition();
QRectF bounds = clipRect();
@@ -479,7 +479,7 @@ void QQuickPinchArea::updatePinch()
// AND one or more of the points has just now been pressed (wasn't pressed already)
// AND both points are inside the bounds.
if (d->touchPoints.count() == 2
- && (touchPoint1.state() & Qt::TouchPointPressed || touchPoint2.state() & Qt::TouchPointPressed) &&
+ && (touchPoint1.state() & QEventPoint::State::Pressed || touchPoint2.state() & QEventPoint::State::Pressed) &&
bounds.contains(touchPoint1.position()) && bounds.contains(touchPoint2.position())) {
d->id1 = touchPoint1.id();
d->pinchActivated = true;
@@ -642,7 +642,7 @@ bool QQuickPinchArea::childMouseEventFilter(QQuickItem *i, QEvent *e)
QTouchEvent *touch = static_cast<QTouchEvent*>(e);
d->touchPoints.clear();
for (int i = 0; i < touch->touchPoints().count(); ++i)
- if (!(touch->touchPoints().at(i).state() & Qt::TouchPointReleased))
+ if (!(touch->touchPoints().at(i).state() & QEventPoint::State::Released))
d->touchPoints << touch->touchPoints().at(i);
updatePinch();
}