forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.3'
Change-Id: I126f3a05212a3d5df78812e66285bc9e8078360b
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user