Merge remote-tracking branch 'origin/4.3'

Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
This commit is contained in:
Orgad Shaneh
2017-06-20 11:30:21 +03:00
48 changed files with 3004 additions and 2039 deletions

View File

@@ -26,6 +26,7 @@
#include "environment.h"
#include "algorithm.h"
#include "qtcassert.h"
#include <QDir>
#include <QProcessEnvironment>
@@ -372,6 +373,7 @@ void Environment::modify(const QList<EnvironmentItem> & list)
} else {
// TODO use variable expansion
QString value = item.value;
int replaceCount = 0;
for (int i=0; i < value.size(); ++i) {
if (value.at(i) == '$') {
if ((i + 1) < value.size()) {
@@ -386,6 +388,8 @@ void Environment::modify(const QList<EnvironmentItem> & list)
Environment::const_iterator it = constFind(name);
if (it != constEnd())
value.replace(i, end-i+1, it.value());
++replaceCount;
QTC_ASSERT(replaceCount < 100, break);
}
}
}