summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-10-10 23:41:14 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-10-12 09:37:41 +0000
commit5962c6e37e747044ab005ca53c7a90b4db210767 (patch)
treebe993cbb6d5fd379bfa8cb52d6dda0b73410ecc1 /src/corelib/io/qprocess.cpp
parent690f9a7e74701e64db1035ccb11673942988d927 (diff)
QtCore: use QStringBuilder in more places
Change-Id: I1a2016039c6cfa35505b987b6d4627bf806500ba Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 8ee8d0b703..8fbe96adb9 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -156,16 +156,8 @@ QStringList QProcessEnvironmentPrivate::toList() const
{
QStringList result;
result.reserve(hash.size());
- Hash::ConstIterator it = hash.constBegin(),
- end = hash.constEnd();
- for ( ; it != end; ++it) {
- QString data = nameToString(it.key());
- QString value = valueToString(it.value());
- data.reserve(data.length() + value.length() + 1);
- data.append(QLatin1Char('='));
- data.append(value);
- result << data;
- }
+ for (Hash::const_iterator it = hash.cbegin(), end = hash.cend(); it != end; ++it)
+ result << nameToString(it.key()) + QLatin1Char('=') + valueToString(it.value());
return result;
}