diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-09-05 11:08:59 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-09-05 11:08:59 +0200 |
commit | 2746518c76e02c642ff29faf568de4de90216e58 (patch) | |
tree | 822a6d979c13b6450c221b2a45ccfb6674bcb8e4 /src/quick/scenegraph/qsgrhisupport.cpp | |
parent | 9e32b23a1514f367921b4a9ee25bc864a008463c (diff) | |
parent | bdf0a46c289298f7378796d62ae5fb283e08657d (diff) | |
download | qtdeclarative-wip/qt6.tar.gz |
Merge remote-tracking branch 'origin/dev' into wip/qt6wip/qt6
Conflicts:
.qmake.conf
src/qml/qml/qqmlengine.cpp
src/qmlmodels/qqmlmodelsmodule.cpp
Change-Id: Id60420f8250a9c97fcfe56d4eea19b62c6870404
Diffstat (limited to 'src/quick/scenegraph/qsgrhisupport.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgrhisupport.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp index 8bae24dc76..a92b6b0c84 100644 --- a/src/quick/scenegraph/qsgrhisupport.cpp +++ b/src/quick/scenegraph/qsgrhisupport.cpp @@ -109,6 +109,12 @@ void QSGRhiSupport::applySettings() { m_set = true; + // This is also done when creating the renderloop but we may be before that + // in case we get here due to a setScenegraphBackend() -> configure() early + // on in main(). Avoid losing info logs since troubleshooting gets + // confusing otherwise. + QSGRhiSupport::checkEnvQSgInfo(); + if (m_requested.valid) { // explicit rhi backend request from C++ (e.g. via QQuickWindow) m_enableRhi = m_requested.rhi; @@ -203,6 +209,13 @@ QSGRhiSupport *QSGRhiSupport::staticInst() return &inst; } +void QSGRhiSupport::checkEnvQSgInfo() +{ + // For compatibility with 5.3 and earlier's QSG_INFO environment variables + if (qEnvironmentVariableIsSet("QSG_INFO")) + const_cast<QLoggingCategory &>(QSG_LOG_INFO()).setEnabled(QtDebugMsg, true); +} + void QSGRhiSupport::configure(QSGRendererInterface::GraphicsApi api) { Q_ASSERT(QSGRendererInterface::isApiRhiBased(api)); |