From 167b22c7010363275f2895ff4965529b35c36eac Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 21 Feb 2022 18:44:31 +0100 Subject: [PATCH] Fix tracking of sg initialized state in rendercontrol The initialized = true statement either went missing or it never was there. This has zero effect on the common usage where the client does not bother with invalidate(), but rather destroys the QQuickRenderControl. However, more complex usages, such as in QQuickWidget do need to invalidate for various reasons, without destroying the entire QQuickRenderControl. Pick-to: 6.3 6.2 Change-Id: Iaabc6309cb42cfdd624321863a5504cdeb01275d Reviewed-by: Qt CI Bot Reviewed-by: Andy Nichols --- src/quick/items/qquickrendercontrol.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp index 1f690f1e85..5d29408b06 100644 --- a/src/quick/items/qquickrendercontrol.cpp +++ b/src/quick/items/qquickrendercontrol.cpp @@ -331,6 +331,7 @@ bool QQuickRenderControl::initialize() params.initialSurfacePixelSize = d->window->size() * d->window->effectiveDevicePixelRatio(); params.maybeSurface = d->window; renderContext->initialize(¶ms); + d->initialized = true; } else { qWarning("QRhi is only compatible with default adaptation"); return false;