summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 019887d..c08d601 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -3127,7 +3127,7 @@ void tst_QWidget::saveRestoreGeometry()
geom = widget.geometry();
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(200);
+ QTest::qWait(500);
QVERIFY(widget.restoreGeometry(savedGeometry));
QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
@@ -3137,55 +3137,55 @@ void tst_QWidget::saveRestoreGeometry()
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(200);
+ QTest::qWait(400);
savedGeometry = widget.saveGeometry();
geom = widget.geometry();
widget.setWindowState(widget.windowState() ^ Qt::WindowFullScreen);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(200);
+ QTest::qWait(400);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
QTRY_COMPARE(widget.geometry(), geom);
QVERIFY((widget.windowState() & Qt::WindowFullScreen));
widget.setWindowState(widget.windowState() ^ Qt::WindowFullScreen);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(20);
+ QTest::qWait(120);
//Restore from Maximised
widget.move(position);
widget.resize(size);
- QTest::qWait(20);
+ QTest::qWait(10);
QTRY_COMPARE(widget.size(), size);
- QTest::qWait(200);
+ QTest::qWait(400);
savedGeometry = widget.saveGeometry();
geom = widget.geometry();
widget.setWindowState(widget.windowState() | Qt::WindowMaximized);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
QTRY_VERIFY(widget.geometry() != geom);
- QTest::qWait(200);
+ QTest::qWait(400);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_COMPARE(widget.geometry(), geom);
QVERIFY(!(widget.windowState() & Qt::WindowMaximized));
//Restore to maximised
widget.setWindowState(widget.windowState() | Qt::WindowMaximized);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
- QTest::qWait(200);
+ QTest::qWait(400);
geom = widget.geometry();
savedGeometry = widget.saveGeometry();
widget.setWindowState(widget.windowState() ^ Qt::WindowMaximized);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowMaximized));
- QTest::qWait(200);
+ QTest::qWait(400);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
QTRY_COMPARE(widget.geometry(), geom);
}
@@ -8683,7 +8683,7 @@ void tst_QWidget::setClearAndResizeMask()
QTRY_COMPARE(child.numPaintEvents, 1);
#else
// and ensure that we don't get any updates at all.
- QCOMPARE(child.numPaintEvents, 0);
+ QTRY_COMPARE(child.numPaintEvents, 0);
#endif
QCOMPARE(topLevel.numPaintEvents, 0);
@@ -8720,9 +8720,9 @@ void tst_QWidget::setClearAndResizeMask()
QTest::qWait(200);
#ifdef Q_WS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
- QCOMPARE(resizeChild.paintedRegion, resizeChild.mask());
+ QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
#else
- QCOMPARE(resizeChild.paintedRegion, QRegion());
+ QTRY_COMPARE(resizeChild.paintedRegion, QRegion());
#endif
resizeChild.paintedRegion = QRegion();
@@ -8731,9 +8731,9 @@ void tst_QWidget::setClearAndResizeMask()
QTest::qWait(100);
#ifdef Q_WS_MAC
// Mac always issues a full update when calling setMask, and we cannot force it to not do so.
- QCOMPARE(resizeChild.paintedRegion, resizeChild.mask());
+ QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask());
#else
- QCOMPARE(resizeChild.paintedRegion, resizeChild.mask() - oldMask);
+ QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask() - oldMask);
#endif
}