diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-03-26 14:08:42 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2024-03-26 21:33:04 +0100 |
commit | 92f39a3919375af7e0eeaa31d010fc7fde7f6c4f (patch) | |
tree | 55746e0fcd729410ddd754a8d7d093ce924a8f34 /src/qmltest/quicktestevent.cpp | |
parent | f0fbedbe69532d9f5d1bc622f0b5b1ed16f23f2b (diff) |
qmltest: add a 'modifiers' argument to mouseMove()
As it stood, TestCase::mouseMove() didn't take a 'modifier'
argument. All the other mouse functions do that, including
mouseDrag(). But even for mouseDrag, the modifier argument was
only applied to mousePress() and mouseRelease(), but not to
the in-between mouse moves.
This patch will implement support for providing a modifier
argument also to mouseMove(). This is needed in order to
test API that distinguishes a normal drag from a ctrl+drag, like
e.g SelectionRectangle.
Pick-to: 6.7 6.6 6.5
Change-Id: Idd800eda4b5b4fd4e9cda94155ca4ec36e935d13
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Diffstat (limited to 'src/qmltest/quicktestevent.cpp')
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index b1b8e60eab..9bd2a9887c 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -318,14 +318,14 @@ bool QuickTestEvent::mouseDoubleClickSequence } bool QuickTestEvent::mouseMove - (QObject *item, qreal x, qreal y, int delay, int buttons) + (QObject *item, qreal x, qreal y, int delay, int buttons, int modifiers) { QWindow *view = eventWindow(item); if (!view) return false; const Qt::MouseButtons effectiveButtons = buttons ? Qt::MouseButtons(buttons) : m_pressedButtons; QtQuickTest::mouseEvent(QtQuickTest::MouseMove, view, item, - Qt::MouseButton(int(effectiveButtons)), Qt::NoModifier, + Qt::MouseButton(int(effectiveButtons)), Qt::KeyboardModifiers(modifiers), QPointF(x, y), delay); return true; } |