aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickwidgets/qquickwidget.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2023-04-05 17:12:07 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-07 22:52:30 +0200
commit30e46e37a3268c5c4ba0730fb7487342961a4c78 (patch)
treecde6bd7ba8aa65d25bd1ea0812728c1c89fa2202 /src/quickwidgets/qquickwidget.cpp
parente1402abff93c96c7bbb580647d20662b99d1a451 (diff)
Fix problem with subFocusItem on non-OpenGL QSG
The subFocusItem state was forgotten because the old parent was deleted, before its focused child was reparented. The test doesn't pass on Android and makes the test process exit with error. Since it prints warnings that indicate issues further down in the RHI stack, we'll skip it for now on that platform. Task-number: QTBUG-112696 Pick-to: 6.5 6.2 Change-Id: Ibb32a11564ff6fbb2091c241d508f12479b234b0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quickwidgets/qquickwidget.cpp')
-rw-r--r--src/quickwidgets/qquickwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index 426a9d717f..8a472a4f0a 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -241,7 +241,7 @@ void QQuickWidgetPrivate::handleWindowChange()
// must be recreated because its RHI will contain a dangling pointer to
// the context.
- delete offscreenWindow;
+ QScopedPointer<QQuickWindow> oldOffScreenWindow(offscreenWindow); // Do not delete before reparenting sgItem
offscreenWindow = nullptr;
delete renderControl;