From cafffc1b161a5b5f2f856c626e8ad2ee50d5d1e1 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 7 May 2010 13:45:12 +0200 Subject: fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux --- tests/auto/qdockwidget/tst_qdockwidget.cpp | 31 +++++++++++++++--------------- 1 file 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(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); } -- cgit v0.12