aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgrhisupport.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-01-13 11:14:12 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-02-24 13:44:37 +0100
commit033154229442e19bc675ab69015d460fe3aee775 (patch)
tree6f8a9f5db0354710c7db0ef6aa576ef3d8595226 /src/quick/scenegraph/qsgrhisupport.cpp
parenta962681a11a4a4a36053d060702353965298b8bb (diff)
Warn when requesting unknown RHI backend
When QSG_RHI_BACKEND is set to something we don't recognize. Change-Id: Ifa18cf38bc110e3a96b94fa89abac5bdfd70ba8a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgrhisupport.cpp')
-rw-r--r--src/quick/scenegraph/qsgrhisupport.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp
index 9194d3e730..cf30cb3f9a 100644
--- a/src/quick/scenegraph/qsgrhisupport.cpp
+++ b/src/quick/scenegraph/qsgrhisupport.cpp
@@ -157,6 +157,8 @@ void QSGRhiSupport::applySettings()
} else if (rhiBackend == QByteArrayLiteral("null")) {
m_rhiBackend = QRhi::Null;
} else {
+ if (!rhiBackend.isEmpty())
+ qWarning("Unknown key \"%s\" for QSG_RHI_BACKEND, falling back to default backend.", qPrintable(rhiBackend));
#if defined(Q_OS_WIN)
m_rhiBackend = QRhi::D3D11;
#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)