qt6-bb10/tests/auto/widgets
Axel Spoerl cd2a3e970a Refactor and fix QMainWindow::tabifiedDockWidgets()
The method traversed QDockAreaLayoutInfo::item_list, to identify
dock widgets tabbed with the QDockWidget argument in a tab bar
It relied on bool QDockAreLayoutInfo::tabbed, which is set to true, when
a QMainWindowTabBar is to be added to a QDockAreaLayoutInfo. This flag
isn't cleared, when the second last dock widget is removed from the
tab bar. It can't be replaced by QMainWindowLayout::isDockWidgetTabbed,
because the flag also represents intermediate states, where e.g. a dock
widget is hovered over, prepares to become a floating tab and then rolls
back, because hovering doesn't result in a drop. In that case, tabbed
must become true, which the dock widget isn't actually tabbed.

Furthermore, the way to traverse item_list didn't find dock widgets
in a floating tab. In that case, tabifiedDockWidgets() wrongly returned
an empty list.

To fix both issues, refactor QMainWindow::tabifiedDockWidgets() to read
the list of dock widgets directly from the QMainWindowTabBar.

Add tests in tst_QDockWidget::floatingTabs() and
updateTabBarOnVisibilityChanged()

Fixes: QTBUG-122001
Pick-to: 6.7 6.6 6.5
Change-Id: Ia9eb3711be642101261f34ee447521cc6accc20c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-02-29 21:14:40 +00:00
..
dialogs Change license for tests files 2024-02-04 09:56:42 +01:00
effects Change license for tests files 2024-02-04 09:56:42 +01:00
graphicsview Remove extra semi-colons 2024-02-06 20:17:18 +09:00
itemviews QAbstractItemView: Release tab focus when hidden 2024-02-29 12:36:16 +01:00
kernel Implement Qt::ImEnabled by isEnabled() and isReadOnly() 2024-03-01 02:22:06 +08:00
styles Change license for tests files 2024-02-04 09:56:42 +01:00
util Change license for tests files 2024-02-04 09:56:42 +01:00
widgets Refactor and fix QMainWindow::tabifiedDockWidgets() 2024-02-29 21:14:40 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00