summaryrefslogtreecommitdiffstats
path: root/tools/configure/environment.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-30 14:11:03 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-30 14:11:03 (GMT)
commit1ba3cac3c7296320ca914f262f124ae7f2dea841 (patch)
tree40e9c04835dcfe8adccb4cedfda5e568f3c92677 /tools/configure/environment.cpp
parent708978d1c18cf938a4e0c29a5a90be5de4e82140 (diff)
parent51582e3d1251766a3ed941530d966e1a591cbed6 (diff)
downloadQt-1ba3cac3c7296320ca914f262f124ae7f2dea841.zip
Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.tar.gz
Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r--tools/configure/environment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 5d9851f..9446864 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -271,8 +271,7 @@ static QByteArray qt_create_environment(const QStringList &environment)
pos += tmpSize;
}
// add the user environment
- for (QStringList::ConstIterator it = environment.begin(); it != environment.end(); it++ ) {
- QString tmp = *it;
+ foreach (const QString &tmp, environment) {
uint tmpSize = sizeof(wchar_t) * (tmp.length() + 1);
envlist.resize(envlist.size() + tmpSize);
memcpy(envlist.data() + pos, tmp.utf16(), tmpSize);
@@ -376,7 +375,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
switch(GetLastError()) {
case E2BIG:
cerr << "execute: Argument list exceeds 1024 bytes" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
case ENOENT:
@@ -390,7 +389,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
break;
default:
cerr << "execute: Unknown error" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
}