Stabilize tst_QMdiArea::subWindowList
Flakily failed on openSUSE. Task-number: QTBUG-68170 Change-Id: Ic75e081238ccf4bad54de39e6bdaa892796b599e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
e110ab6c28
commit
7eab9ec63b
@ -1400,6 +1400,7 @@ void tst_QMdiArea::subWindowList()
|
|||||||
QMdiArea workspace;
|
QMdiArea workspace;
|
||||||
workspace.show();
|
workspace.show();
|
||||||
qApp->setActiveWindow(&workspace);
|
qApp->setActiveWindow(&workspace);
|
||||||
|
QVERIFY(QTest::qWaitForWindowActive(&workspace));
|
||||||
|
|
||||||
QList<QMdiSubWindow *> activationOrder;
|
QList<QMdiSubWindow *> activationOrder;
|
||||||
QVector<QMdiSubWindow *> windows;
|
QVector<QMdiSubWindow *> windows;
|
||||||
@ -1418,8 +1419,7 @@ void tst_QMdiArea::subWindowList()
|
|||||||
|
|
||||||
windows[staysOnTop1]->setWindowFlags(windows[staysOnTop1]->windowFlags() | Qt::WindowStaysOnTopHint);
|
windows[staysOnTop1]->setWindowFlags(windows[staysOnTop1]->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
workspace.setActiveSubWindow(windows[activeSubWindow]);
|
workspace.setActiveSubWindow(windows[activeSubWindow]);
|
||||||
qApp->processEvents();
|
QTRY_COMPARE(workspace.activeSubWindow(), windows[activeSubWindow]);
|
||||||
QCOMPARE(workspace.activeSubWindow(), windows[activeSubWindow]);
|
|
||||||
activationOrder.move(activationOrder.indexOf(windows[activeSubWindow]), windowCount - 1);
|
activationOrder.move(activationOrder.indexOf(windows[activeSubWindow]), windowCount - 1);
|
||||||
|
|
||||||
QList<QMdiSubWindow *> subWindows = workspace.subWindowList(windowOrder);
|
QList<QMdiSubWindow *> subWindows = workspace.subWindowList(windowOrder);
|
||||||
@ -1441,13 +1441,11 @@ void tst_QMdiArea::subWindowList()
|
|||||||
|
|
||||||
windows[staysOnTop2]->setWindowFlags(windows[staysOnTop2]->windowFlags() | Qt::WindowStaysOnTopHint);
|
windows[staysOnTop2]->setWindowFlags(windows[staysOnTop2]->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
workspace.setActiveSubWindow(windows[staysOnTop2]);
|
workspace.setActiveSubWindow(windows[staysOnTop2]);
|
||||||
qApp->processEvents();
|
QTRY_COMPARE(workspace.activeSubWindow(), windows[staysOnTop2]);
|
||||||
QCOMPARE(workspace.activeSubWindow(), windows[staysOnTop2]);
|
|
||||||
activationOrder.move(activationOrder.indexOf(windows[staysOnTop2]), windowCount - 1);
|
activationOrder.move(activationOrder.indexOf(windows[staysOnTop2]), windowCount - 1);
|
||||||
|
|
||||||
workspace.setActiveSubWindow(windows[activeSubWindow]);
|
workspace.setActiveSubWindow(windows[activeSubWindow]);
|
||||||
qApp->processEvents();
|
QTRY_COMPARE(workspace.activeSubWindow(), windows[activeSubWindow]);
|
||||||
QCOMPARE(workspace.activeSubWindow(), windows[activeSubWindow]);
|
|
||||||
activationOrder.move(activationOrder.indexOf(windows[activeSubWindow]), windowCount - 1);
|
activationOrder.move(activationOrder.indexOf(windows[activeSubWindow]), windowCount - 1);
|
||||||
|
|
||||||
QList<QMdiSubWindow *> widgets = workspace.subWindowList(windowOrder);
|
QList<QMdiSubWindow *> widgets = workspace.subWindowList(windowOrder);
|
||||||
|
Loading…
Reference in New Issue
Block a user