Skip to content

Instantly share code, notes, and snippets.

@keithel
Last active November 14, 2023 21:14
Show Gist options
  • Save keithel/bf99731ea8265b70d9c4fb4fc3faabbe to your computer and use it in GitHub Desktop.
Save keithel/bf99731ea8265b70d9c4fb4fc3faabbe to your computer and use it in GitHub Desktop.
QTBUG-118578 notes

Some bug reproductions and notes on QTBUG-118578

Undocking tabbed widget from floating window creates empty redundant window

Screencasts showing broken behavior with https://codereview.qt-project.org/c/qt/qtbase/+/516878

Patchset 27

Undocking a QDockWidgetGroupWindow from QMainWindow, followed by undocking one tab from the group window (keeping tab in a dragging state), followed by re-docking that tab to any location will result in the tab you are docking to instead be docked to the QMainWindow in the same position that the group window was docked. See screencast 516878-27-redock-to-floating-dockwidget-docks-qmainwindow.webm

How to apply all patches needed to pull in Qt R&D work in progress fixing docking issue QTBUG-118578

Cherry-picks required to bring it to v6.5.2

faec937756810bbc478da677efb0dca4531a6222 Implement debug operator for QDockAreaLayoutItem
46aa713c34c7bc90f3981b3d723591149572203c QDockAreaLayoutInfo: fix QDebug stream operator
efc4bf5e63cd90c2e1f3bda1cce8dea957865f0c QDockArealLayoutItem: recurse subinfo in QDebug operator<<
bbeff2a3350dd3396400865525d509b784c2d93e Extend qDebug functionality for QDockWidget
c02f8b9d4d9a6578bb2017bafbb963d09641383f Fully export QDockWidget debug operator
581c4bcb62a9d3cbb4c33df3f0f7a0a965225e74 Use platform drags for drags of docks and toolbars on wayland
c93ab8c2a015b40b9a487ed9f23a72aebea8d52a QDockWidget: Remove "group" bool trap

c93ab8c does not cleanly apply, but the patch needed to cleanly apply it is easy to skip, and changes are not necessary. Use a multiline regex replacement using perl to fix it, then continue the cherry-pick.

$ git cherry-pick faec937 46aa713 efc4bf5 bbeff2a c02f8b9 c93ab8c 366b4d3 814b7fd
$ perl -0777p -i.bak -e 's/<<* HEAD(\n.*)*(    state.*scope\);\n)>>*.*\n/\2/mg' src/widgets/widgets/qdockwidget.cpp
$ git add src/widgets/widgets/qdockwidget.cpp
$ git cherry-pick --continue
$ git fetch ssh://kkyzivat@codereview.qt-project.org:29418/qt/qtbase refs/changes/78/516878/27 && git cherry-pick FETCH_HEAD

For v6.5.2 on one line:

git cherry-pick -x faec937 46aa713 efc4bf5 bbeff2a c02f8b9 c93ab8c 366b4d3 814b7fd || perl -0777p -i.bak -e 's/<<* HEAD(\n.*)*(    state.*scope\);\n)>>*.*\n/\2/mg' src/widgets/widgets/qdockwidget.cpp && git add src/widgets/widgets/qdockwidget.cpp && git -c core.editor=true cherry-pick --continue && git fetch ssh://kkyzivat@codereview.qt-project.org:29418/qt/qtbase refs/changes/78/516878/27 && git cherry-pick FETCH_HEAD

Cherry-picks required to bring this to v6.5.3

First, revert Senthil's temporary fix: git revert --no-edit 9f02de8

Then, cherry-picks needed:

bbeff2a3350dd3396400865525d509b784c2d93e Extend qDebug functionality for QDockWidget
c02f8b9d4d9a6578bb2017bafbb963d09641383f Fully export QDockWidget debug operator
** 581c4bcb62a9d3cbb4c33df3f0f7a0a965225e74 Use platform drags for drags of docks and toolbars on wayland
c93ab8c2a015b40b9a487ed9f23a72aebea8d52a QDockWidget: Remove "group" bool trap
  • 581c4bc is skipped - not really necessary, but conflicts are introduced if you skip. Conflicting diffs are resolved with The perl expression listed above for v6.5.2

For v6.5.3 on one line:

git revert --no-edit 9f02de8 && git cherry-pick -x bbeff2a c02f8b9 c93ab8c || perl -0777p -i.bak -e 's/<<* HEAD(\n.*)*(    state.*scope\);\n)>>*.*\n/\2/mg' src/widgets/widgets/qdockwidget.cpp && git add src/widgets/widgets/qdockwidget.cpp && git -c core.editor=true cherry-pick --continue && git fetch ssh://kkyzivat@codereview.qt-project.org:29418/qt/qtbase refs/changes/78/516878/30 && git cherry-pick FETCH_HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment