diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-11-01 23:04:49 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-11-03 18:11:08 +0000 |
commit | 9151ab44bc7af04471d034e21746d7e9da0c01ea (patch) | |
tree | d418ecd66ab9322888697106446200c892b1ca5b /tests/auto/widgets/widgets | |
parent | 0babdac53700ba383d5ec44d52166ab39b9bcaed (diff) |
Release mouse buttons after double click
Otherwise, the button state maintained by Qt when using the offscreen
plugin is not reset, breaking following tests.
Pick-to: 6.2
Task-number: QTBUG-97964
Change-Id: Ib37fd038e214863e1e316dc3d41e9d28c157b1f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp index 66e7326a06..9fa85ee8e5 100644 --- a/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp +++ b/tests/auto/widgets/widgets/qtabbar/tst_qtabbar.cpp @@ -788,6 +788,7 @@ void tst_QTabBar::tabBarClicked() QCOMPARE(clickSpy.takeFirst().takeFirst().toInt(), 0); QCOMPARE(doubleClickSpy.count(), 1); QCOMPARE(doubleClickSpy.takeFirst().takeFirst().toInt(), 0); + QTest::mouseRelease(&tabBar, button, {}, tabPos); const QPoint barPos(tabBar.tabRect(0).right() + 5, tabBar.tabRect(0).center().y()); @@ -801,6 +802,7 @@ void tst_QTabBar::tabBarClicked() QCOMPARE(clickSpy.takeFirst().takeFirst().toInt(), -1); QCOMPARE(doubleClickSpy.count(), 1); QCOMPARE(doubleClickSpy.takeFirst().takeFirst().toInt(), -1); + QTest::mouseRelease(&tabBar, button, {}, barPos); button = Qt::MouseButton(button << 1); } |