Qt 6.8.3 with BlackBerry 10 (QNX 8 / ARMv7) patches
 
 
 
 
 
 
Go to file
Tor Arne Vestbø c956eb8edd Reparent QWindow children when reparenting QWidget
When a QWidget was reparented, we would take care to reparent its
backing QWidgetWindow as well, into the nearest QWindow of the
new QWidget parent.

However we would only do this for the reparented widget itself,
and not any of its child widgets. In the case where the widget
has native children with their own QWindows, the widget itself
may not (yet) be native, e.g. if it hasn't been shown yet, or
if the user has set Qt::WA_DontCreateNativeAncestors.

In these scenarios, we would be left with dangling QWindows,
still hanging off their original QWindow parents, which
would eventually lead to crashes.

We now reparent both the QWindow of the reparented widget (as
long as it's not about to be destroyed), and any QQWindow
children we can reach. For each child hierarchy we can stop
once we reach a QWindow, as the QWindow children of that
window will follow along once we reparent the QWindow.

QWindowContainer widgets don't usually have their own
windowHandle(), but still manage a QWindow inside their
parent widget hierarchy. These will not be reparented
during QWidgetPrivate::setParent_sys(), but instead
do their own reparenting later in QWidget::setParent
via QWindowContainer::parentWasChanged(). The only
exception to this is when the top level is about to
be destroyed, in which case we let the window container
know during QWidgetPrivate::setParent_sys().

Finally, although there should not be any leftover
QWindows in the reparented widget once we have done
the QWidgetWindow and QWindowContainer reparenting,
we still do a pass over any remaining QWindows and
reparent those too, since the original code included
this as a possibility.

We could make further improvements in this areas, such
as moving the QWindowContainer::parentWasChanged() call,
but the goal was to keep this change as minimal as possible
so we can back-port it.

Fixes: QTBUG-122747
Pick-to: 6.7.0 6.7 6.6 6.5
Change-Id: I4d1217fce4c3c48cf5f7bfbe9d561ab408ceebb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-03-14 13:50:36 +00:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
LICENSES Use canonical capitalization of Unicode-3.0 SPDX tag 2024-03-13 14:43:10 +00:00
bin CMake/Windows: add quotes around the whole path, not just the dir 2024-03-04 20:31:48 +01:00
cmake cmake: Propagate Apple platform build requirements to qconfig.pri 2024-03-14 14:50:36 +01:00
coin coin: Add instructions to build standalone examples 2024-03-14 11:44:16 +01:00
config.tests Correct license in config.test 2024-02-20 16:22:28 +01:00
dist Remove dist/README 2024-02-29 15:35:57 +01:00
doc Bump Android platform version in documentation to 34 2024-03-08 11:46:58 +02:00
examples CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec CMake: Allow building all examples as standalone just like tests 2024-03-14 11:44:16 +01:00
mkspecs cmake: Propagate Apple platform build requirements to qconfig.pri 2024-03-14 14:50:36 +01:00
qmake Port to QDirListing 2024-03-03 14:02:07 +02:00
src Reparent QWindow children when reparenting QWidget 2024-03-14 13:50:36 +00:00
tests Reparent QWindow children when reparenting QWidget 2024-03-14 13:50:36 +00:00
util Correct wasm util file 2024-03-07 16:10:02 +01:00
.cmake.conf Remove year from generic Qt copyright information 2024-02-14 09:30:07 +00:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Git ignore Visual Studio CMake build directories 2023-11-24 23:42:05 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt CMake: Move most of CMakeLists.txt into QtBaseHelpers.cmake 2024-03-14 11:44:16 +01:00
config_help.txt CMake: Document -init-submodules option of the super configure script 2024-03-05 12:59:21 +01:00
configure Change configure license 2024-02-02 15:23:02 +00:00
configure.bat configure.bat: Fix errors on Windows 2024-03-05 11:56:24 +01:00
configure.cmake CMake: remove a duplicate check for C++2b 2024-02-29 14:02:32 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
licenseRule.json Add a licenseRule.json file for checking of SPDX license identifiers 2024-03-07 11:08:18 +01:00
qt_cmdline.cmake configure: Fully remove support for -c++std c++14/c++17 2024-03-13 20:43:14 +01:00