diff options
Diffstat (limited to 'tests/auto/qdockwidget/tst_qdockwidget.cpp')
-rw-r--r-- | tests/auto/qdockwidget/tst_qdockwidget.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp index 8d9e7bbf..3ac0ce7 100644 --- a/tests/auto/qdockwidget/tst_qdockwidget.cpp +++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp @@ -654,7 +654,7 @@ void tst_QDockWidget::dockLocationChanged() QCOMPARE(qvariant_cast<Qt::DockWidgetArea>(spy.at(0).at(0)), Qt::TopDockWidgetArea); spy.clear(); - + dw.setFloating(true); QTest::qWait(100); dw.setFloating(false); @@ -881,20 +881,21 @@ void tst_QDockWidget::taskQTBUG_1665_closableChanged() void tst_QDockWidget::taskQTBUG_9758_undockedGeometry() { - QMainWindow window; - QDockWidget dock1(&window); - QDockWidget dock2(&window); - window.addDockWidget(Qt::RightDockWidgetArea, &dock1); - window.addDockWidget(Qt::RightDockWidgetArea, &dock2); - window.tabifyDockWidget(&dock1, &dock2); - dock1.hide(); - dock2.hide(); - window.show(); - dock1.setFloating(true); - dock1.show(); - - QVERIFY(dock1.x() >= 0); - QVERIFY(dock1.y() >= 0); + QMainWindow window; + QDockWidget dock1(&window); + QDockWidget dock2(&window); + window.addDockWidget(Qt::RightDockWidgetArea, &dock1); + window.addDockWidget(Qt::RightDockWidgetArea, &dock2); + window.tabifyDockWidget(&dock1, &dock2); + dock1.hide(); + dock2.hide(); + window.show(); + dock1.setFloating(true); + dock1.show(); + QTest::qWaitForWindowShown(&dock1); + + QVERIFY(dock1.x() >= 0); + QVERIFY(dock1.y() >= 0); } |