aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-06-02 18:29:06 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-06 17:56:46 +0000
commit47ef121e1a436fd46129cdaa1a4398c82045eb97 (patch)
treec642a0e39eb0be5eded1cdf606d5f49403f102e9
parent3e91ad66056ff2ccfb4ba6b85f500827348e9397 (diff)
QSGBatchRenderer: look for ShaderManager by type only, ignore namev6.3.16.3.1
There's only ever one of them, and accessing objectName() from a different than the owning thread is UB (data race). The default-constructed QString() is needed, cf. QTBUG-103986. This is a hotfix for QTBUG-102403, which ran afoul of the guards added in qtbase/3f32dcd1ddcbe04c77ccd83e2eaa566d7212e732 to fix QTBUG-99775. Task-number: QTBUG-102403 Change-Id: Idf07b1119ec393e7fd179e8b545cfeb70f5916ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 543806e96da237a4625b593ed773813e0cdfe3fb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 06ea705c22..dfba7379d0 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -900,7 +900,7 @@ Renderer::Renderer(QSGDefaultRenderContext *ctx, QSGRendererInterface::RenderMod
// The shader manager is shared between renderers (think for example Item
// layers that create a new Renderer each) with the same rendercontext (and
// so same QRhi).
- m_shaderManager = ctx->findChild<ShaderManager *>(QStringLiteral("__qt_ShaderManager"), Qt::FindDirectChildrenOnly);
+ m_shaderManager = ctx->findChild<ShaderManager *>(QString(), Qt::FindDirectChildrenOnly);
if (!m_shaderManager) {
m_shaderManager = new ShaderManager(ctx);
m_shaderManager->setObjectName(QStringLiteral("__qt_ShaderManager"));