QmlPuppet: Fix warning about extra argument to function call

MouseArea3D::applyFreeRotation only takes four arguments, so remove
the unused _targetPosOnScreen property.

Change-Id: I10940f6954de89cb7a01bdbea6a0a55e69cb9c65
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2021-05-12 12:23:12 +03:00
parent 73c0175f4b
commit 1608fa5265

View File

@@ -184,7 +184,6 @@ Node {
property bool dragging: false property bool dragging: false
property vector3d _pointerPosPressed property vector3d _pointerPosPressed
property vector3d _targetPosOnScreen
property vector3d _startRotation property vector3d _startRotation
function handlePressed(screenPos) function handlePressed(screenPos)
@@ -195,8 +194,6 @@ Node {
// Need to recreate vector as we need to adjust it and we can't do that on reference of // Need to recreate vector as we need to adjust it and we can't do that on reference of
// scenePosition, which is read-only property // scenePosition, which is read-only property
var scenePos = rotateGizmo.dragHelper.pivotScenePosition(rotateGizmo.targetNode); var scenePos = rotateGizmo.dragHelper.pivotScenePosition(rotateGizmo.targetNode);
_targetPosOnScreen = view3D.mapFrom3DScene(scenePos);
_targetPosOnScreen.z = 0;
_pointerPosPressed = Qt.vector3d(screenPos.x, screenPos.y, 0); _pointerPosPressed = Qt.vector3d(screenPos.x, screenPos.y, 0);
// Recreate vector so we don't follow the changes in targetNode.rotation // Recreate vector so we don't follow the changes in targetNode.rotation
@@ -213,7 +210,7 @@ Node {
mouseAreaFree.applyFreeRotation( mouseAreaFree.applyFreeRotation(
rotateGizmo.targetNode, _startRotation, _pointerPosPressed, rotateGizmo.targetNode, _startRotation, _pointerPosPressed,
Qt.vector3d(screenPos.x, screenPos.y, 0), _targetPosOnScreen); Qt.vector3d(screenPos.x, screenPos.y, 0));
rotateGizmo.rotateChange(); rotateGizmo.rotateChange();
} }
@@ -225,7 +222,7 @@ Node {
mouseAreaFree.applyFreeRotation( mouseAreaFree.applyFreeRotation(
rotateGizmo.targetNode, _startRotation, _pointerPosPressed, rotateGizmo.targetNode, _startRotation, _pointerPosPressed,
Qt.vector3d(screenPos.x, screenPos.y, 0), _targetPosOnScreen); Qt.vector3d(screenPos.x, screenPos.y, 0));
rotateGizmo.rotateCommit(); rotateGizmo.rotateCommit();
dragging = false; dragging = false;