diff options
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 252d47f698..13237e8c7a 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -4246,6 +4246,7 @@ void tst_QWidget::scroll() UpdateWidget updateWidget; updateWidget.resize(w, h); updateWidget.reset(); + updateWidget.move(QGuiApplication::primaryScreen()->geometry().center() - QPoint(250, 250)); updateWidget.show(); qApp->setActiveWindow(&updateWidget); QVERIFY(QTest::qWaitForWindowActive(&updateWidget)); @@ -4257,7 +4258,7 @@ void tst_QWidget::scroll() qApp->processEvents(); QRegion dirty(QRect(0, 0, w, 10)); dirty += QRegion(QRect(0, 10, 10, h - 10)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4267,7 +4268,7 @@ void tst_QWidget::scroll() qApp->processEvents(); QRegion dirty(QRect(0, 0, w, 10)); dirty += QRegion(QRect(0, 10, 10, 10)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } if (updateWidget.width() < 200 || updateWidget.height() < 200) @@ -4283,7 +4284,7 @@ void tst_QWidget::scroll() dirty += QRegion(QRect(0, 60, 110, 40)); dirty += QRegion(QRect(50, 100, 60, 10)); dirty += QRegion(QRect(50, 110, 10, 40)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4294,7 +4295,7 @@ void tst_QWidget::scroll() QRegion dirty(QRect(0, 0, 100, 100)); dirty += QRegion(QRect(100, 100, 100, 10)); dirty += QRegion(QRect(100, 110, 10, 90)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } } #endif |