From d556d7a6b80d862c1b010358e16ee29004a32f75 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 25 Nov 2019 10:49:54 +0100 Subject: Avoid initializing QFlags with 0 or nullptr in tests Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99. Change-Id: Ib5d17611e43e7ab2c63c7f0587f549377f262e32 Reviewed-by: Allan Sandfeld Jensen --- tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp') diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp index 339ff293f4..2452bc34c5 100644 --- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp +++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp @@ -120,11 +120,11 @@ void tst_QScrollBar::task_209492() const QPoint pressPoint(verticalScrollBar->width() / 2, verticalScrollBar->height() - 10); const QPoint globalPressPoint = verticalScrollBar->mapToGlobal(globalPressPoint); QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint, - Qt::LeftButton, Qt::LeftButton, 0); + Qt::LeftButton, Qt::LeftButton, {}); QApplication::sendEvent(verticalScrollBar, &mousePressEvent); QTest::qWait(1); QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, pressPoint, globalPressPoint, - Qt::LeftButton, Qt::LeftButton, 0); + Qt::LeftButton, Qt::LeftButton, {}); QApplication::sendEvent(verticalScrollBar, &mouseReleaseEvent); // Check that the action was triggered once. @@ -189,11 +189,11 @@ void tst_QScrollBar::QTBUG_42871() const QPoint pressPoint(scrollBarWidget.width() / 2, scrollBarWidget.height() - 10); const QPoint globalPressPoint = scrollBarWidget.mapToGlobal(pressPoint); QMouseEvent mousePressEvent(QEvent::MouseButtonPress, pressPoint, globalPressPoint, - Qt::LeftButton, Qt::LeftButton, 0); + Qt::LeftButton, Qt::LeftButton, {}); QApplication::sendEvent(&scrollBarWidget, &mousePressEvent); QTest::qWait(1); QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, pressPoint, globalPressPoint, - Qt::LeftButton, Qt::LeftButton, 0); + Qt::LeftButton, Qt::LeftButton, {}); QApplication::sendEvent(&scrollBarWidget, &mouseReleaseEvent); // Check that the action was triggered once. QCOMPARE(myHandler.updatesCount, 1); -- cgit v1.2.3