qt6-bb10/tests/auto/widgets
Tor Arne Vestbø 5b09d9e6d6 Sync QWindow visible state during QWidget destruction
A call to QWidget::destroy() will end up in QWindow::destroy(), which
calls QWindow::setVisible(false).

A call to QWindow::setVisible(false) on a widget's window will under
normal circumstances end up in QWidgetPrivate::setVisible(), which in
turn recurses back into QWindowPrivate::setVisible(), via
QWidgetPrivate::hide_helper(), ensuring that the QWindow internal
state is updated, visibleChanged emitted, and show/hide events sent.

Durin QWidget::destroy() we end up in QWindow::destroy(), which calls
QWindow::setVisible(false), but in this case the widget no longer has
Qt::WA_WState_Created, so the hide_helper() call is skipped, and the
corresponding QWindow is not kept in the loop.

To work around this we could have checked for windowHandle() instead
of Qt::WA_WState_Created before calling hide_helper(), but that had
many other side effects, so we opt for a more targeted fix.

Pick-to: 6.7 6.6 6.5
Change-Id: I68f80e5f7df9ee811afcd274a7ee4de31a110da5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-12-20 14:33:49 +01:00
..
dialogs Purge empty BLACKLIST files from tests 2023-11-24 18:09:16 +01:00
effects Stabilize tst_QGraphicsEffect::draw() 2023-08-25 09:04:37 +02:00
graphicsview Android: Skip focusProxy_QTBUG_51856() test case temporarily 2023-12-07 10:56:43 +02:00
itemviews QAIV: reset state if removing index while editing or committing 2023-12-14 22:59:33 +01:00
kernel Sync QWindow visible state during QWidget destruction 2023-12-20 14:33:49 +01:00
styles Reset palette resolve mask in windows vista style 2023-09-05 10:59:00 +02:00
util Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
widgets QLineEdit: Use existing selection when deleting a word 2023-12-14 19:25:16 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00