Commit e804700b authored by Daniel Teske's avatar Daniel Teske
Browse files

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: default avatarDaniel Teske <daniel.teske@digia.com>
parent 10133693
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment