diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp index 57d25ed5dc147a9aa868e39a2bddd3fbb14eb931..77ff2b1605315ec85d783f562c92b4b74b32f0e1 100644 --- a/modules/gui/qt/qt.cpp +++ b/modules/gui/qt/qt.cpp @@ -967,11 +967,12 @@ static void *Thread( void *obj ) }; static const char* const asyncRhiProbeCompletedProperty = "asyncRhiProbeCompleted"; + // NOTE: `QSettings` accepts `QAnyStringView` starting from Qt 6.4, use `QLatin1String(View)`: + static constexpr QLatin1String graphicsApiKey {"graphics-api"}; if (qEnvironmentVariableIsEmpty("QSG_RHI_BACKEND") && qEnvironmentVariableIsEmpty("QT_QUICK_BACKEND") && (QT_VERSION < QT_VERSION_CHECK(6, 4, 0) || !uint(qEnvironmentVariableIntValue("QSG_RHI_PREFER_SOFTWARE_RENDERER")))) { - static const char* const graphicsApiKey = "graphics-api"; const QVariant graphicsApiValue = p_intf->mainSettings->value(graphicsApiKey); // settings value can be string (ini file), do not use `typeId()`: if (graphicsApiValue.isValid() && Q_LIKELY(graphicsApiValue.canConvert<int>())) @@ -1053,7 +1054,7 @@ static void *Thread( void *obj ) &QQuickWindow::sceneGraphError, &app, [&app, mainCtx, settings](QQuickWindow::SceneGraphError error, const QString &message) { - qWarning() << "Compositor: Scene Graph Error: " << error << ", Message: " << message; + qCritical() << "Compositor: Scene Graph Error: " << error << ", Message: " << message; assert(mainCtx); #ifdef _WIN32 // This is not really important, as with graceful exit the events in the queue should @@ -1062,7 +1063,7 @@ static void *Thread( void *obj ) if (!app.property(asyncRhiProbeCompletedProperty).toBool()) { assert(settings); - settings->remove(asyncRhiProbeCompletedProperty); + settings->remove(graphicsApiKey); settings->sync(); } #endif