qt6-bb10/tests/auto/widgets
Axel Spoerl 10a143ccd7 Prevent dock widget from resizing upon unplugging from main window
QDockWidgetLayoutState::itemRect() has been used to calculate a dock
widget's size when unplugging from the main window. This method is meant
to calculate the size of the rubber band, showing the dock widget's
dock area.

The rubber band is by QDockAreaLayout::sep wider (top or bottom dock)
or higher (left or right dock) than the respective dock widget. This is
to make sure the rubber band is never fully covered by the dock widget.

By wrongly using itemRect() also for the dock widget's size after
unplugging, the dock widget grows in size each time it is unplugged.

This patch passes an invalid QRect to QDockWidgetPrivate::unplug(), in
order to prevent resizing.

tst_QDockWidget::unplugAndResize() is extended to check size
consistency after unplugging (corrected for frame margins).

Fixes: QTBUG-106531
Pick-to: 6.4 6.2
Change-Id: I1cf9f695691b0e165a5cb2881781602426e5d587
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-21 18:41:43 +00:00
..
dialogs Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.h 2022-09-01 13:26:30 +02:00
effects Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
graphicsview Don't rely on synthetic mouse events in updateFocusChainWhenChildDie test 2022-09-14 19:07:14 +02:00
itemviews Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
kernel Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
styles Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
util Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
widgets Prevent dock widget from resizing upon unplugging from main window 2022-09-21 18:41:43 +00:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00