qt5base-lts/tests/auto/corelib/kernel/qobject
Tor Arne Vestbø 4ba7a76985 Allow QObjects to opt in to receiving ParentAboutToChange/ParentChange
QWidget already handles this, but it might be useful for non-Widget
object hierarchies as well, such as in Qt Quick.

The flag is opt in, and as QWidget already handles these events by
itself (without checking any flags), we assert that we don't end up
in this code path, instead of enabling it for QWidget. The latter
would mean refactoring the QWidget code, with possible regressions.

Docs and header comments have been updated to reflect that this
event is not widget specific. (This is an issue with other events
as well, that are documented to say "widget", since they came
from a time when there was only QWidget, but nowadays apply to
e.g. QWindow as well. That's something for another fix though).

Change-Id: Ib71962131d6011c17dcce8c01bd8adcdaa58d798
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-08-30 15:45:41 +02:00
..
signalbug tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
.gitignore tst_qobject: Fix execution in debug&release shadow builds 2018-06-26 10:56:31 +00:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qobject.cpp Allow QObjects to opt in to receiving ParentAboutToChange/ParentChange 2023-08-30 15:45:41 +02:00