diff --git a/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro b/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro index 4299f7711e..e33271428f 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro +++ b/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qmdisubwindow -QT += widgets testlib +QT += widgets widgets-private testlib INCLUDEPATH += . SOURCES += tst_qmdisubwindow.cpp DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index 4908f1b9f7..8b2f032172 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -30,6 +30,7 @@ #include #include "qmdisubwindow.h" +#include "private/qmdisubwindow_p.h" #include "qmdiarea.h" #include @@ -723,7 +724,9 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove() resizeSpy.clear(); QCOMPARE(resizeSpy.count(), 0); - QTest::qWait(250); // delayed update of dirty regions + // we need to wait for the resizeTimer to make sure updateDirtyRegions is called + auto priv = static_cast(qt_widget_private(window)); + QTRY_COMPARE(priv->resizeTimerId, -1); // Enter resize mode. int offset = window->style()->pixelMetric(QStyle::PM_MDIFrameWidth) / 2;