qt6-bb10/tests/auto
Tor Arne Vestbø 5ba0982b28 Don't set ExplicitShowHide on children when showing parent widget
As a result of using QWidget::setVisible to show the child widgets we
would end up also setting ExplicitShowHide. This is not in line with
the intent of ExplicitShowHide, which is to flag a widget as explicitly
shown/hidden by the developer, which in turn prevents Qt Widgets from
toggling WState_Hidden when the widget is reparented.

By using QWidgetPrivate::setVisible instead, we can show the child
without setting ExplicitShowHide.

As side effect of this is that we no longer reset WA_WState_Hidden
from QWidgetWindowPrivate::setVisible(). This is an issue when the
setVisible call comes as a result of destroying the QWidgetWindow,
as that is an implicit hide, and should not result in the widget
having WA_WState_Hidden. QWidget handles this case in hideChildren
by not calling QWidgetPrivate::setVisible -- instead doing its own
reset of WA_WState_Visible. We don't want to untangle this just yet,
so as a workaround we detect that the widget is already !isVisible(),
thanks to hideChildren having hidden it, and then skip the call
to QWidgetPrivate::setVisible that results from QWindow::destroy().

Task-number: QTBUG-121398
Pick-to: 6.7
Change-Id: Ib5b4d9c84f0569124c5f3ca2169cabff18934e2d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-01 15:28:56 +01:00
..
bic/data Add binary compatibility file for 6.6.0 2023-10-17 22:23:42 +03:00
cmake Introduce QTP0003 which controls the BUILD_SHARED_LIBS impact on user projects 2024-02-01 09:46:51 +01:00
concurrent Fix QThreadPool::maxThreadCount() usage 2024-01-08 18:29:26 +01:00
corelib QDirIterator: don't create test dirs/files in the source dir 2024-02-01 16:28:55 +02:00
dbus QDBusConnectionPrivate: Close connection after failed q_dbus_bus_register() 2023-12-07 23:36:15 +01:00
gui Stabilize tst_QFileSystemModel::showFilesOnly test case 2024-01-31 21:18:48 +01:00
guiapplauncher Turn the "concentriccircles" example into snippets, update screenshot 2023-12-14 20:06:32 +01:00
network Skip compilation of tst_QLocalSocket::verifyListenWithDescriptor on VxWorks 2024-01-31 07:04:37 +01:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
printsupport Dialogs: clean up native dialogs when object gets destroyed 2023-09-06 23:12:33 +02:00
shared coretext: Support variable application fonts 2023-10-03 19:25:46 +02:00
sql SQL: rename enablePositionalBinding() to setPositionalBindingEnabled() 2024-01-10 04:32:49 +01:00
testlib QTest: add -[no]throwon{fail,skip} command line arguments 2024-01-27 22:56:12 +01:00
tools moc: store the FQN in JSON superClass objects 2024-01-26 23:50:57 +01:00
wasm wasm tests: Add test for making network request 2023-12-19 17:05:55 +00:00
widgets Don't set ExplicitShowHide on children when showing parent widget 2024-02-01 15:28:56 +01:00
xml CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt CI: Enable some tests under corelib/thread for Wasm platform 2023-09-14 11:58:48 +02:00
network-settings.h QtNetworkSettings: narrow down hasIPv6 to specific OSes 2023-08-29 07:20:51 -07:00