qt6-bb10/tests/auto/widgets
Tor Arne Vestbø 6fbbbef260 QRhiWidget: Tear down resources before window has changed
We were handling QEvent::WindowChangeInternal, but based on what the
code is doing, what the comments say, and what QQuickWidget does,
the right event should be WindowAboutToChangeInternal.

This fixes a crash when reparenting a QRhiWidget into another widget,
where we could call removeCleanupCallback() on an RHI that was already
gone.

The fact that we have a stale RHI pointer at WindowChangeInternal time
is still problematic, and caused by our call to addCleanupCallback not
happening as it should for the first call to ensureRhi(), but this will
be fixed in a follow up.

Pick-to: 6.7
Change-Id: I054120e97a24a1f74af44b2d251470792f03f7f3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-02-14 18:51:29 +01:00
..
dialogs Change license for tests files 2024-02-04 09:56:42 +01:00
effects Change license for tests files 2024-02-04 09:56:42 +01:00
graphicsview Remove extra semi-colons 2024-02-06 20:17:18 +09:00
itemviews QAbstractItemView: close all child editors when parent is removed 2024-02-08 18:31:26 +01:00
kernel Add QPlatformIntegration::BackingStoreStaticContents capability 2024-02-13 13:55:01 +01:00
styles Change license for tests files 2024-02-04 09:56:42 +01:00
util Change license for tests files 2024-02-04 09:56:42 +01:00
widgets QRhiWidget: Tear down resources before window has changed 2024-02-14 18:51:29 +01:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00