From 815911cc85883f621874d3c11714e80dc352ee29 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 4 Feb 2010 16:04:14 +0100 Subject: Fixes a behaviour for QDockWidget used without QMainWindow There was a behaviour change. Even though using QDockWidget without QMainWindow is not supported, it broke applications. --- src/gui/widgets/qdockwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp index fdace46..54189de 100644 --- a/src/gui/widgets/qdockwidget.cpp +++ b/src/gui/widgets/qdockwidget.cpp @@ -1010,7 +1010,7 @@ void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect if (!floating && parent) { QMainWindowLayout *mwlayout = qobject_cast(q->parentWidget()->layout()); - if (!mwlayout || mwlayout->dockWidgetArea(q) == Qt::NoDockWidgetArea) + if (mwlayout && mwlayout->dockWidgetArea(q) == Qt::NoDockWidgetArea) return; // this dockwidget can't be redocked } -- cgit v0.12