summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-30 08:56:25 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-06-30 15:08:36 +0200
commit3b93882e2b2397b7e259da30552ff1ee05e0036c (patch)
tree4b3e28b5071c610f58d6d3d94a488b26367049a0 /src/core/web_engine_context.cpp
parent7c966f59a8f8f8a51ffe4325f0809e0d3363a9fc (diff)
Replace qgetenv with qEnvironmentVariable
This preserves unicode characters in the environment variable on Windows. Fixes: QTBUG-85054 Change-Id: I3352cc3db4ce8d7b9b352c1634e3239954780618 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index b36e76417..1399c0fdc 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -173,9 +173,9 @@ bool usingDefaultSGBackend()
}
if (device.isEmpty())
- device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND"));
+ device = qEnvironmentVariable("QT_QUICK_BACKEND");
if (device.isEmpty())
- device = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE"));
+ device = qEnvironmentVariable("QMLSCENE_DEVICE");
return device.isEmpty();
}
@@ -878,7 +878,7 @@ base::CommandLine* WebEngineContext::commandLine() {
QStringList appArgs = QCoreApplication::arguments();
if (qEnvironmentVariableIsSet(kChromiumFlagsEnv)) {
appArgs = appArgs.mid(0, 1); // Take application name and drop the rest
- appArgs.append(parseEnvCommandLine(QString::fromLocal8Bit(qgetenv(kChromiumFlagsEnv))));
+ appArgs.append(parseEnvCommandLine(qEnvironmentVariable(kChromiumFlagsEnv)));
}
#ifdef Q_OS_WIN
appArgs.removeAll(QStringLiteral("--enable-webgl-software-rendering"));