summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qdockwidget.cpp
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 /src/gui/widgets/qdockwidget.cpp
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 'src/gui/widgets/qdockwidget.cpp')
-rw-r--r--src/gui/widgets/qdockwidget.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index 54189de..ae00710 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1270,11 +1270,7 @@ void QDockWidget::setFloating(bool floating)
d->setWindowState(floating, false, floating ? r : QRect());
if (floating && r.isNull()) {
- QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(this->layout());
- QRect titleArea = layout->titleArea();
- int h = layout->verticalTitleBar ? titleArea.width() : titleArea.height();
- QPoint p = mapToGlobal(QPoint(h, h));
- move(p);
+ setAttribute(Qt::WA_Moved, false); //we want it at the default position
}
}