Skip to content

Commit

Permalink
Allow to drag a QDockWidgetGroupWindow into one of its QDockWidget
Browse files Browse the repository at this point in the history
This fixes the 2. of QTBUG-52108

Change-Id: Id887f470c7822f6b264d6b739e8658d9809f6609
Task-numer: QTBUG-52108
Reviewed-by: Friedemann Kleint <[email protected]>
  • Loading branch information
ogoffart committed Jul 2, 2016
1 parent 27df6cb commit 9cb8ca2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/widgets/widgets/qmainwindowlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2366,13 +2366,10 @@ void QMainWindowLayout::hover(QLayoutItem *widgetItem, const QPoint &mousePos)
QWidget *w = qobject_cast<QWidget*>(c);
if (!w)
continue;
if (w == widget)
continue;
if (!w->isTopLevel() || !w->isVisible() || w->isMinimized())
continue;
if (!qobject_cast<QDockWidget*>(w) && !qobject_cast<QDockWidgetGroupWindow *>(w))
continue;
candidates << w;
if (w != widget && w->isTopLevel() && w->isVisible() && !w->isMinimized())
candidates << w;
if (QDockWidgetGroupWindow *group = qobject_cast<QDockWidgetGroupWindow *>(w)) {
// Sometimes, there are floating QDockWidget that have a QDockWidgetGroupWindow as a parent.
foreach (QObject *c, group->children()) {
Expand Down

0 comments on commit 9cb8ca2

Please sign in to comment.