summaryrefslogtreecommitdiff
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.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 4536ed72cc..a9fa9bc1ec 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -1756,11 +1756,11 @@ void tst_QWidget::setTabOrder()
container.show();
container.activateWindow();
+ qApp->setActiveWindow(&container);
#ifdef Q_WS_X11
QTest::qWaitForWindowShown(&container);
QTest::qWait(50);
#endif
- qApp->setActiveWindow(&container);
QTest::qWait(100);
@@ -2316,8 +2316,9 @@ void tst_QWidget::showMinimizedKeepsFocus()
QTRY_COMPARE(qApp->focusWidget(), static_cast<QWidget*>(0));
window.showNormal();
- QTest::qWait(30);
qApp->setActiveWindow(&window);
+ QTest::qWaitForWindowShown(&window);
+ QTest::qWait(30);
#ifdef Q_WS_MAC
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
@@ -3116,7 +3117,7 @@ void tst_QWidget::saveRestoreGeometry()
widget.resize(size);
widget.show();
QTest::qWaitForWindowShown(&widget);
- QTest::qWait(100);
+ QTest::qWait(200);
QTRY_COMPARE(widget.geometry().size(), size);
QRect geom;
@@ -3126,15 +3127,15 @@ void tst_QWidget::saveRestoreGeometry()
geom = widget.geometry();
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(100);
+ QTest::qWait(200);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
QTRY_COMPARE(widget.geometry(), geom);
//Restore to full screen
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
QTest::qWait(200);
savedGeometry = widget.saveGeometry();
@@ -3165,7 +3166,7 @@ void tst_QWidget::saveRestoreGeometry()
QTest::qWait(20);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
QTRY_VERIFY(widget.geometry() != geom);
- QTest::qWait(100);
+ QTest::qWait(200);
QVERIFY(widget.restoreGeometry(savedGeometry));
QTest::qWait(20);
QTRY_COMPARE(widget.geometry(), geom);
@@ -5388,7 +5389,7 @@ void tst_QWidget::showAndMoveChild()
child.move(desktopDimensions.width()/2, desktopDimensions.height()/2);
qApp->processEvents();
- verifyColor(child.geometry().translated(tlwOffset), Qt::blue);
+ verifyColor(child.geometry().translated(tlwOffset), Qt::blue);
verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red);
}
@@ -6407,7 +6408,7 @@ void tst_QWidget::render()
qApp->processEvents();
qApp->sendPostedEvents();
- QTest::qWait(100);
+ QTest::qWait(250);
QImage sourceImage = QPixmap::grabWidget(&source).toImage();
qApp->processEvents();
@@ -6513,6 +6514,7 @@ void tst_QWidget::renderInvisible()
dummyFocusWidget.show();
QTest::qWaitForWindowShown(&dummyFocusWidget);
qApp->processEvents();
+ QTest::qWait(100);
// Create normal reference image.
const QSize calendarSize = calendar->size();