Avoid runtime QT_OPENGL warning on Qt 6.0

This commit is contained in:
Cameron Gutman 2020-11-23 18:36:32 -06:00
parent 46940eb15a
commit 2ef714f87b

View File

@ -334,7 +334,7 @@ int main(int argc, char *argv[])
// password prompts on macOS. // password prompts on macOS.
qputenv("QT_SSL_USE_TEMPORARY_KEYCHAIN", "1"); qputenv("QT_SSL_USE_TEMPORARY_KEYCHAIN", "1");
#ifdef Q_OS_WIN32 #if defined(Q_OS_WIN32) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if (!qEnvironmentVariableIsSet("QT_OPENGL")) { if (!qEnvironmentVariableIsSet("QT_OPENGL")) {
// On Windows, use ANGLE so we don't have to load OpenGL // On Windows, use ANGLE so we don't have to load OpenGL
// user-mode drivers into our app. OGL drivers (especially Intel) // user-mode drivers into our app. OGL drivers (especially Intel)
@ -421,7 +421,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
QTranslator translator; QTranslator translator;
qDebug() << "Translation loaded: " << translator.load(QString(":/languages/qml_") + QLocale::system().name()); qDebug() << "Translation loaded:" << translator.load(QString(":/languages/qml_") + QLocale::system().name());
app.installTranslator(&translator); app.installTranslator(&translator);
// After the QGuiApplication is created, the platform stuff will be initialized // After the QGuiApplication is created, the platform stuff will be initialized