From e2c5ee11bcdc2f093004716f5e65e81cdce9ff85 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 2 Jun 2020 14:43:19 +0200 Subject: Remove QSG_NO_RHI Task-number: QTBUG-79268 Change-Id: Ie7240fe7de4fcd73be65c8afec3466189d7d3f9a Reviewed-by: Andy Nichols --- src/quick/scenegraph/qsgrhisupport.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/quick/scenegraph/qsgrhisupport.cpp') diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index c8aa9ef24f..510f98ed6b 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -150,8 +150,8 @@ void QSGRhiSupport::applySettings() } } else { - // New Qt 6 default: enable RHI, unless QSG_NO_RHI is set - m_enableRhi = !qEnvironmentVariableIsSet("QSG_NO_RHI"); + // There is no other way in Qt 6. The direct OpenGL rendering path of Qt 5 has been removed. + m_enableRhi = true; // check env.vars., fall back to platform-specific defaults when backend is not set const QByteArray rhiBackend = qgetenv("QSG_RHI_BACKEND"); @@ -189,8 +189,7 @@ void QSGRhiSupport::applySettings() } } - if (!m_enableRhi) - return; + Q_ASSERT(m_enableRhi); // cannot be anything else in Qt 6 // At this point the RHI backend is fixed, it cannot be changed once we // return from this function. This is because things like the QWindow -- cgit v1.2.3