summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp9
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 f9ee2e485a..c446513fe7 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -4245,6 +4245,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));
@@ -4256,7 +4257,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);
}
{
@@ -4266,7 +4267,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)
@@ -4282,7 +4283,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);
}
{
@@ -4293,7 +4294,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