diff options
Diffstat (limited to 'src/imports/testlib/TestCase.qml')
-rw-r--r-- | src/imports/testlib/TestCase.qml | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml index ed8bf55d6b..020f934aac 100644 --- a/src/imports/testlib/TestCase.qml +++ b/src/imports/testlib/TestCase.qml @@ -435,13 +435,31 @@ Item { qtest_fail("window not shown", 2) } - function mouseMove(item, x, y, delay) { + function mouseMove(item, x, y, delay, buttons) { if (delay == undefined) delay = -1 - if (!qtest_events.mouseMove(item, x, y, delay)) + if (buttons == undefined) + buttons = Qt.NoButton + if (!qtest_events.mouseMove(item, x, y, delay, buttons)) qtest_fail("window not shown", 2) } + function mouseWheel(item, x, y, delta, buttons, modifiers, delay, orientation) { + if (delay == undefined) + delay = -1 + if (buttons == undefined) + buttons = Qt.NoButton + if (modifiers === undefined) + modifiers = Qt.NoModifier + if (delta == undefined) + delta = 0 + if (orientation == undefined) + orientation = Qt.Vertical + if (!qtest_events.mouseWheel(item, x, y, buttons, modifiers, delta, delay, orientation)) + qtest_fail("window not shown", 2) + } + + // Functions that can be overridden in subclasses for init/cleanup duties. function initTestCase() {} function cleanupTestCase() {} @@ -692,4 +710,4 @@ Item { if (when && !completed && !running) qtest_run() } -}
\ No newline at end of file +} |