diff options
| author | Martin Jones <martin.jones@nokia.com> | 2010-08-26 23:34:59 (GMT) |
|---|---|---|
| committer | Martin Jones <martin.jones@nokia.com> | 2010-08-26 23:34:59 (GMT) |
| commit | be9968c0ee3943c7cc169b4ad8e36155b06bf620 (patch) | |
| tree | fd39afb623d7a787a42f71f148ebd051fdd51a14 /tools/configure/environment.cpp | |
| parent | d477cc1498ccf2204dd0e5cd6676f5c0788a9090 (diff) | |
| parent | ef4c65fc364a0262389c0497092a0fa5e1f7d4c3 (diff) | |
| download | Qt-be9968c0ee3943c7cc169b4ad8e36155b06bf620.zip Qt-be9968c0ee3943c7cc169b4ad8e36155b06bf620.tar.gz Qt-be9968c0ee3943c7cc169b4ad8e36155b06bf620.tar.bz2 | |
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt 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; } |
