b26cdbd877
When a dock widget is hovered over a QDockWidgetGroupWindow, a gap item is inserted at its potential docking position. Since only one item at a time can be moved with the mouse, only one such gap item can exist. QDockAreaLayoutInfo::insertGap() therefore contains an assertion, that kicks in if a second gap item is inserted. QDockWidgetGroupWindow::hover() checks if the dock widget is hovered over a gap item. If that is the case, no additional gap item is inserted. The check fails if a gap item exists in the group window, but the dock widget is hovered over another part of that group window. This can be the case if the group window already contains more than one dock widget: By inserting the gap, the group window's size changes, one of the existing dock widgets receives another hover event and a second gap insertion is attempted. This patch adds QDockAreaLayoutInfo::hasGapItem() to check if a gap already exists. The method is queried in addition to prevent a second gap insertion. An autotest has not been added, because gap items appear and disappear during hovering. The improved functionality can be tested manually with the mainwindow example. Fixes: QTBUG-112491 Fixes: QTBUG-114542 Pick-to: 6.6 6.5 Change-Id: I9ea64e729873a86eb98ea950fbb066817fc25a07 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake | ||
sync.profile |