summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qmacgesturerecognizer.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-17 12:06:52 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-23 19:50:26 +0200
commit9c5698a8fcf9b890d8ed23b8e6cbab2971c8dc87 (patch)
treef32317cd546af26c1bc0439d99cf98c34ce99849 /src/widgets/kernel/qmacgesturerecognizer.cpp
parent850d850c5af8ff77a4b9d53457ec6b1ba6c20cb3 (diff)
Fix compiler warnings from deprecated QTouchEvent::touchPoints
Replace with QPointerEvent::points(). As a drive-by, turn QEventPoint copies into const references where possible. Change-Id: Ia5e0645493984fe9177dd3ca16afdb4d56e384ee Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/kernel/qmacgesturerecognizer.cpp')
-rw-r--r--src/widgets/kernel/qmacgesturerecognizer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/kernel/qmacgesturerecognizer.cpp b/src/widgets/kernel/qmacgesturerecognizer.cpp
index f14b2f6e6c..8485510490 100644
--- a/src/widgets/kernel/qmacgesturerecognizer.cpp
+++ b/src/widgets/kernel/qmacgesturerecognizer.cpp
@@ -203,7 +203,7 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
switch (event->type()) {
case QEvent::TouchBegin: {
const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
- if (ev->touchPoints().size() == 1) {
+ if (ev->points().size() == 1) {
reset(gesture);
_startPos = QCursor::pos();
_target = target;
@@ -217,7 +217,7 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
break;
const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
- if (ev->touchPoints().size() == 1)
+ if (ev->points().size() == 1)
return QGestureRecognizer::FinishGesture;
break;}
case QEvent::TouchUpdate: {
@@ -225,7 +225,7 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
break;
const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
- if (ev->touchPoints().size() == 1) {
+ if (ev->points().size() == 1) {
if (_panTimer.isActive()) {
// INVARIANT: Still in maybeGesture. Check if the user
// moved his finger so much that it makes sense to cancel the pan: