Skip to content
Snippets Groups Projects
Commit 0cd5e277 authored by Daniel Teske's avatar Daniel Teske
Browse files

Utils::Environment: Use systemEnvironment from QProcessEnvironment


The QProcessEnvironment::systemEnvironment() uses the function
GetEnvironmentStringsW(), which allows for retrieving values that can
not be encoded in the current locale.

Also see QTCREATORBUG-8184 for a related bug.

Change-Id: Id7c9b8c881db7ba2efd13f2fb241fbbdb9d2a7eb
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 497843c9
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <QDir> #include <QDir>
#include <QProcess> #include <QProcess>
#include <QProcessEnvironment>
#include <QString> #include <QString>
#include <QCoreApplication> #include <QCoreApplication>
...@@ -40,7 +41,7 @@ class SystemEnvironment : public Utils::Environment ...@@ -40,7 +41,7 @@ class SystemEnvironment : public Utils::Environment
{ {
public: public:
SystemEnvironment() SystemEnvironment()
: Environment(QProcess::systemEnvironment()) : Environment(QProcessEnvironment::systemEnvironment().toStringList())
{ {
if (Utils::HostOsInfo::isLinuxHost()) { if (Utils::HostOsInfo::isLinuxHost()) {
QString ldLibraryPath = value(QLatin1String("LD_LIBRARY_PATH")); QString ldLibraryPath = value(QLatin1String("LD_LIBRARY_PATH"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment