diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-27 15:02:29 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-27 15:02:29 (GMT) |
commit | 5ca7070ee91c740442d0d18778e7f35f9fcc7b2b (patch) | |
tree | a544bdcde127922668aad9bff38d46ecc37aaca6 /tools/configure/environment.cpp | |
parent | cf8b664a89b40d6fce4f1da7233a5563b67ba60c (diff) | |
parent | 90f43f185e9fa70d6610b138d8c3a5770b9d1deb (diff) | |
download | Qt-5ca7070ee91c740442d0d18778e7f35f9fcc7b2b.zip Qt-5ca7070ee91c740442d0d18778e7f35f9fcc7b2b.tar.gz Qt-5ca7070ee91c740442d0d18778e7f35f9fcc7b2b.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r-- | tools/configure/environment.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 943a8a2..03fd0cc 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -281,8 +281,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); @@ -386,7 +385,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: @@ -400,7 +399,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; } |