diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2017-03-21 13:43:28 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2017-03-22 14:28:51 +0000 |
commit | ee84af00d1ad28138a66ac422b1edb7be896512b (patch) | |
tree | be840d6483c754ea3200435d71ec84f48651e30f /src/dbus/qdbusmessage_p.h | |
parent | 97be8253fbe9d9e4954b6d345e8fe64bd566a395 (diff) |
Fix floating dock widget having the wrong parent
When dragging out a tabbed group which contains placeholder
for floating QDockWidget, the floating QDockWidget would not
be reparented to the new QDockWidgetGroupWindow. That's because
QDockAreaLayoutInfo::reparentWidgets does not reparent floating
widget (because of the item.skip test)
However, we need to be careful when reparenting to pass the
flags so it does not get docked.
Also do not reparent QDockWidgetGroupWindow which may end up
temporarily in the layout during animation when dragging a
QDockWidgetGroupWindow onto another.
Step to reproduce a crash that if fixed by this patch (with
the mainwindow example):
1. Enable QMainWindow::GroupedDragging from the "Main window" menu
2. Add a new dock widget, "Foo", from the "Dock Widgets"
3. Tab "Foo" together with the black dock widget
4. Drag "Foo" out. (Now, Foo is still a child of the QMainWindow,
and is still in the layout as tabbed, but is skipped)
5. Drag the black dockwidget out. (This, in fact, crates a
QDockWidgetGroupWindow which contains the black dockwidget and the
floating "Foo", but since "Foo" is floating, it is not reparented)
6. Destroy "Foo" using the "Dock Widgets" menu. (Since Foo's parent
is the QMainWindow, it is not removed from the QDockWidgetGroupWindow's
layout, which will cause crash on the next relayout)"
This commits amends commits d57bb19902f863fc6db07674f6bd8881b0886b39
and 0feeb6f6d2cfaa964763ca1fcab65672812b4eef
Change-Id: I600a56cdd889435b83d2b740598a24d81059bf44
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src/dbus/qdbusmessage_p.h')
0 files changed, 0 insertions, 0 deletions