summaryrefslogtreecommitdiffstats
path: root/tools/configure/environment.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-20 15:05:01 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-08-20 15:36:57 (GMT)
commit8c47746c8da6d9d431e69fb2a828e151c36318d0 (patch)
tree6d6b0108ff1255a7d702084fe2237894951f8443 /tools/configure/environment.cpp
parent0f8498584fe3f3c5e200076c0a3b7fbe33db4b52 (diff)
downloadQt-8c47746c8da6d9d431e69fb2a828e151c36318d0.zip
Qt-8c47746c8da6d9d431e69fb2a828e151c36318d0.tar.gz
Qt-8c47746c8da6d9d431e69fb2a828e151c36318d0.tar.bz2
fix Norwegian Breakfast Network warnings in configure
Reviewed-by: ossi
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 e93f9a0..62b32f1 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -277,8 +277,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);
@@ -382,7 +381,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:
@@ -396,7 +395,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;
}