diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-01-11 07:28:47 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-21 18:25:38 +0000 |
commit | b33fd136ca709f7dbb11a77cd6e2a58849f3fd44 (patch) | |
tree | f490300a0644b18a7950c6be641dd8fd9e4f6255 /tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp | |
parent | 268145ccf692aacd56f2a4d168f4c8231e273fbd (diff) |
tests: port to QMutableEventPoint static API
This code was actually ok (no UB), but it's in the way of making
QMutableEventPoint a befriendable namespace, so port from using
QMutableEventPoint to QEventPoint instances + QMutableEventPoint
static setters.
Task-number: QTBUG-99615
Change-Id: I7ddcf154cb5da9b6ea2f0f0d8cac130a28203371
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit c096435c307c610fe2dd3f177a1705b86d3631ab)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Diffstat (limited to 'tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp')
-rw-r--r-- | tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp b/tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp index 50f6c3c435..da84bb0a63 100644 --- a/tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp +++ b/tests/auto/quick/pointerhandlers/qquickpinchhandler/tst_qquickpinchhandler.cpp @@ -195,12 +195,12 @@ void tst_QQuickPinchHandler::pinchProperties() QCOMPARE(rotMaxSpy.count(),1); } -QMutableEventPoint makeTouchPoint(int id, QPoint p, QQuickView *v, QQuickItem *i) +QEventPoint makeTouchPoint(int id, QPoint p, QQuickView *v, QQuickItem *i) { - QMutableEventPoint touchPoint(id); - touchPoint.setPosition(i->mapFromScene(p)); - touchPoint.setGlobalPosition(v->mapToGlobal(p)); - touchPoint.setScenePosition(p); + QEventPoint touchPoint(id); + QMutableEventPoint::setPosition(touchPoint, i->mapFromScene(p)); + QMutableEventPoint::setGlobalPosition(touchPoint, v->mapToGlobal(p)); + QMutableEventPoint::setScenePosition(touchPoint, p); return touchPoint; } |