diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-03-31 20:45:04 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-04-11 17:27:42 +0200 |
commit | 07aaa7c1b68f035f71a6ef77d330dddac6a96512 (patch) | |
tree | c05054c32642c5a26319b381a76685fdee61806e /tests/auto/quick/pointerhandlers/qquickpinchhandler/data | |
parent | 79d61b3ab7fcc75454b81d5e78d4f404a9c4bd6c (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/auto/quick/pointerhandlers/qquickpinchhandler/data')
-rw-r--r-- | tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml b/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml index 37f22c949a..bf01c401a8 100644 --- a/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml +++ b/tests/auto/quick/pointerhandlers/qquickpinchhandler/data/pinchproperties.qml @@ -35,7 +35,14 @@ Rectangle { } } - Text { color: "magenta"; z: 1; text: "scale: " + blackRect.scale} + Text { + color: "magenta" + z: 1 + text: "scale: " + blackRect.scale + + "\npos: " + blackRect.x.toFixed(2) + ", " + blackRect.y.toFixed(2) + + "\ntranslation: active " + pincharea.activeTranslation.x.toFixed(2) + ", " + pincharea.activeTranslation.y.toFixed(2) + + "\n persistent " + pincharea.persistentTranslation.x.toFixed(2) + ", " + pincharea.persistentTranslation.y.toFixed(2) + } Rectangle { id: blackRect |