forked from qt-creator/qt-creator
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: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QString>
|
||||
#include <QCoreApplication>
|
||||
|
||||
@@ -40,7 +41,7 @@ class SystemEnvironment : public Utils::Environment
|
||||
{
|
||||
public:
|
||||
SystemEnvironment()
|
||||
: Environment(QProcess::systemEnvironment())
|
||||
: Environment(QProcessEnvironment::systemEnvironment().toStringList())
|
||||
{
|
||||
if (Utils::HostOsInfo::isLinuxHost()) {
|
||||
QString ldLibraryPath = value(QLatin1String("LD_LIBRARY_PATH"));
|
||||
|
||||
Reference in New Issue
Block a user