forked from qt-creator/qt-creator
Utils::Environment support magic windows environment variables
The cmd shell on windows sets environment variables starting with a '='. Task-number: QTCREATORBUG-8716 Change-Id: I3bb5c15b543339f41a4f895c81ed55ac2701b95c Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -73,7 +73,7 @@ QList<EnvironmentItem> EnvironmentItem::fromStringList(const QStringList &list)
|
||||
{
|
||||
QList<EnvironmentItem> result;
|
||||
foreach (const QString &string, list) {
|
||||
int pos = string.indexOf(QLatin1Char('='));
|
||||
int pos = string.indexOf(QLatin1Char('='), 1);
|
||||
if (pos == -1) {
|
||||
EnvironmentItem item(string, QString());
|
||||
item.unset = true;
|
||||
@@ -101,7 +101,7 @@ QStringList EnvironmentItem::toStringList(const QList<EnvironmentItem> &list)
|
||||
Environment::Environment(const QStringList &env, OsType osType) : m_osType(osType)
|
||||
{
|
||||
foreach (const QString &s, env) {
|
||||
int i = s.indexOf(QLatin1Char('='));
|
||||
int i = s.indexOf(QLatin1Char('='), 1);
|
||||
if (i >= 0) {
|
||||
if (m_osType == OsTypeWindows)
|
||||
m_values.insert(s.left(i).toUpper(), s.mid(i+1));
|
||||
|
||||
Reference in New Issue
Block a user