aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/pointer
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-03-31 20:45:04 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2023-04-11 17:27:42 +0200
commit07aaa7c1b68f035f71a6ef77d330dddac6a96512 (patch)
treec05054c32642c5a26319b381a76685fdee61806e /tests/manual/pointer
parent79d61b3ab7fcc75454b81d5e78d4f404a9c4bd6c (diff)
Fix PinchHandler.persistentTranslation; test cumulative native gestures
Since we do not want persistentTranslation to be always the same as target.position, clearly we cannot use xAxis/yAxis to store the initial target position: thus the startPos() function was wrong, and is now removed. We need to store it in a separate m_startTargetPos variable like DragHandler does, and as PinchHandler did before 7867a683fcb938939fb2837a26ac8e1941e3fe08. Add an internal doc comment to clarify the arguments to QQuickItemPrivate::adjustedPosForTransform(). tst_QQuickPinchHandler::cumulativeNativeGestures() now checks the result of adjustedPosForTransform(): how far the target item moved. Pick-to: 6.5 Fixes: QTBUG-111220 Change-Id: I04237cb82a1abaaeab873a0d887acaf322f262ce Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/manual/pointer')
-rw-r--r--tests/manual/pointer/pinchAndWheel.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/manual/pointer/pinchAndWheel.qml b/tests/manual/pointer/pinchAndWheel.qml
index fa60f4a79c..e75faa1892 100644
--- a/tests/manual/pointer/pinchAndWheel.qml
+++ b/tests/manual/pointer/pinchAndWheel.qml
@@ -25,7 +25,9 @@ Rectangle {
function getTransformationDetails(item, pinchhandler) {
return "\n\npinch.scale:" + pinchhandler.scale.toFixed(2)
+ "\npinch.rotation:" + pinchhandler.rotation.toFixed(2)
- + "°\npinch.translation:" + "(" + pinchhandler.translation.x.toFixed(2) + "," + pinchhandler.translation.y.toFixed(2) + ")"
+ + "°\npinch.activeTranslation:" + "(" + pinchhandler.activeTranslation.x.toFixed(2) + "," + pinchhandler.activeTranslation.y.toFixed(2) + ")"
+ + "\npinch.persistentTranslation:" + "(" + pinchhandler.persistentTranslation.x.toFixed(2) + "," + pinchhandler.persistentTranslation.y.toFixed(2) + ")"
+ + " item pos " + "(" + transformable.x.toFixed(2) + "," + transformable.y.toFixed(2) + ")"
+ "\nscale wheel.rotation:" + scaleWheelHandler.rotation.toFixed(2)
+ "°\nhorizontal wheel.rotation:" + horizontalRotationWheelHandler.rotation.toFixed(2)
+ "°\ncontrol-rotation wheel.rotation:" + controlRotationWheelHandler.rotation.toFixed(2)