summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-25 01:00:25 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-11-25 11:30:04 +0100
commit58c69df4d38324644bc49ec5f42ee8343a454b2d (patch)
treede0a1ce603292dcaff134d4e1e8ab064295515a2 /tests/auto/testlib
parent03b1d2c44940322208c12c7bceee376b51d8e852 (diff)
parent59a705e3710b0ba93bb698e3223241cfac932948 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/mouse/tst_mouse.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/testlib/selftests/mouse/tst_mouse.cpp b/tests/auto/testlib/selftests/mouse/tst_mouse.cpp
index 3c731cde69..d097027e7e 100644
--- a/tests/auto/testlib/selftests/mouse/tst_mouse.cpp
+++ b/tests/auto/testlib/selftests/mouse/tst_mouse.cpp
@@ -93,31 +93,31 @@ void tst_Mouse::stateHandlingPart1()
// verify that we have a clean state after the previous data set
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::NoButton);
- QTest::mousePress(&w, Qt::LeftButton, 0, point);
+ QTest::mousePress(&w, Qt::LeftButton, { }, point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::LeftButton);
- QTest::mousePress(&w, Qt::RightButton, 0, point);
+ QTest::mousePress(&w, Qt::RightButton, { }, point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::LeftButton | Qt::RightButton);
QTest::mouseMove(&w, point += step);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::LeftButton | Qt::RightButton);
- QTest::mouseRelease(&w, Qt::LeftButton, 0, point);
+ QTest::mouseRelease(&w, Qt::LeftButton, { }, point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::RightButton);
QTest::mouseMove(&w, point += step);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::RightButton);
// test invalid input - left button was already released
- QTest::mouseRelease(&w, Qt::LeftButton, 0, point += point);
+ QTest::mouseRelease(&w, Qt::LeftButton, { }, point += point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::RightButton);
// test invalid input - right button is already pressed
- QTest::mousePress(&w, Qt::RightButton, 0, point);
+ QTest::mousePress(&w, Qt::RightButton, { }, point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::RightButton);
// now continue with valid input
- QTest::mouseRelease(&w, Qt::RightButton, 0, point += point);
+ QTest::mouseRelease(&w, Qt::RightButton, { }, point += point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::NoButton);
QTest::mouseMove(&w, point += step);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::NoButton);
// exit this test function with some button in a pressed state
- QTest::mousePress(&w, Qt::LeftButton, 0, point);
- QTest::mousePress(&w, Qt::RightButton, 0, point);
+ QTest::mousePress(&w, Qt::LeftButton, { }, point);
+ QTest::mousePress(&w, Qt::RightButton, { }, point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::LeftButton | Qt::RightButton);
}
@@ -144,8 +144,8 @@ void tst_Mouse::stateHandlingPart2()
QSKIP("Not implemented beyond this point!");
QPoint point(40, 40);
- QTest::mousePress(&w, Qt::LeftButton, 0, point);
- QTest::mousePress(&w, Qt::RightButton, 0, point);
+ QTest::mousePress(&w, Qt::LeftButton, { }, point);
+ QTest::mousePress(&w, Qt::RightButton, { }, point);
QCOMPARE(QTestPrivate::qtestMouseButtons, Qt::LeftButton | Qt::RightButton);
w.moveCount = 0;
// The windowing system will send mouse events with no buttons set
@@ -201,11 +201,11 @@ void tst_Mouse::deterministicEvents()
QCOMPARE(w.moveCount, 0);
static QPoint m_cachedLastCursorPosition;
if (firstRun) {
- QTest::mousePress(&w, Qt::LeftButton, 0, QPoint(40, 40));
+ QTest::mousePress(&w, Qt::LeftButton, { }, QPoint(40, 40));
m_cachedLastCursorPosition = QGuiApplicationPrivate::lastCursorPosition.toPoint();
} else {
QPoint point = w.mapFromGlobal(m_cachedLastCursorPosition);
- QTest::mousePress(&w, Qt::LeftButton, 0, point);
+ QTest::mousePress(&w, Qt::LeftButton, { }, point);
}
QCOMPARE(w.pressCount, 1);
QCOMPARE(w.moveCount, 1);