summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-05-04 11:19:03 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-05-04 11:20:24 (GMT)
commitde73874e1f52ed323b87a36d072048023d22112e (patch)
treee0c6e8649df9fc1f0d3d5ba2f3160cce21381a29 /tests
parent171d77c62f857bf6fc0761bb62af24251c36053c (diff)
downloadQt-de73874e1f52ed323b87a36d072048023d22112e.zip
Qt-de73874e1f52ed323b87a36d072048023d22112e.tar.gz
Qt-de73874e1f52ed323b87a36d072048023d22112e.tar.bz2
Fixed the position of the dock widget when undocked
Reviewed-By: gabi Task-Number: QTBUG-9758
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdockwidget/tst_qdockwidget.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp
index a734985..8d9e7bbf 100644
--- a/tests/auto/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp
@@ -96,6 +96,7 @@ private slots:
void task248604_infiniteResize();
void task258459_visibilityChanged();
void taskQTBUG_1665_closableChanged();
+ void taskQTBUG_9758_undockedGeometry();
};
// Testing get/set functions
@@ -878,6 +879,25 @@ void tst_QDockWidget::taskQTBUG_1665_closableChanged()
QVERIFY(!(dock.windowFlags() & Qt::WindowCloseButtonHint));
}
+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);
+}
+
+
QTEST_MAIN(tst_QDockWidget)
#include "tst_qdockwidget.moc"