Skip to content

Commit

Permalink
Stabilize tst_QGraphicsProxyWidget::scrollUpdate
Browse files Browse the repository at this point in the history
The test waits a bit hoping that all paint events are delivered after
showing the widget so that we can count the rectangles that are getting
updated when scrolling.

Waiting for 20ms is too short unless the system is completely idle.
Based on testing on a local VM, 150ms produces reliable results.

Pick-to: 6.2 6.3
Change-Id: I7729e94eae41476be67291a2f664cff784f96c7d
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
vohi committed Dec 22, 2021
1 parent 6d41027 commit 5d04c27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ void tst_QGraphicsProxyWidget::scrollUpdate()
view.show();
QVERIFY(QTest::qWaitForWindowActive(&view));
QTRY_VERIFY(view.npaints >= 1);
QTest::qWait(20);
QTest::qWait(150);
widget->paintEventRegion = QRegion();
widget->npaints = 0;
view.paintEventRegion = QRegion();
Expand Down

0 comments on commit 5d04c27

Please sign in to comment.