From 66b4321cd13412b93f1f4e8a8f3e238ce99f9e63 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 17 Jun 2020 13:06:23 +0200 Subject: Add "rhi" as an accepted scenegraph backend name Change-Id: Ic0f1a1ffe18aa12cdf6643e52644053f4d191380 Reviewed-by: Eirik Aavitsland --- src/quick/scenegraph/qsgcontextplugin.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/quick/scenegraph') diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index ed054f3aa0..45ecb2009b 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -137,10 +137,17 @@ QSGAdaptationBackendData *contextFactory() // default to the software renderer #if !QT_CONFIG(vulkan) && !defined(Q_OS_WIN) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS) if (requestedBackend.isEmpty() - && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { - requestedBackend = QString::fromLocal8Bit("software"); + && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + { + requestedBackend = QLatin1String("software"); } #endif + + // This is handy if some of the logic above goes wrong and we select + // e.g. the software backend when it is not desired. + if (requestedBackend == QLatin1String("rhi")) + requestedBackend.clear(); // empty = no custom backend to load + if (!requestedBackend.isEmpty()) { qCDebug(QSG_LOG_INFO, "Loading backend %s", qUtf8Printable(requestedBackend)); -- cgit v1.2.3