summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurlquery.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-06-08 22:56:55 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-06-11 13:36:15 +0000
commit552fba23862d2f2c88bd09202b8c1b5904830128 (patch)
tree111d169f156598868bb562d903b1aa5a2928174d /src/corelib/io/qurlquery.cpp
parent6b5029199d8eab325992e07fa7c98718c9533ca0 (diff)
core: Add several QList::reserve() calls.
Reduces reallocations. Change-Id: Ib63539fb690a80245d8fe81ff8468e79ffa8e57c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/io/qurlquery.cpp')
-rw-r--r--src/corelib/io/qurlquery.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp
index 91e6e21e20..2b695a4f7b 100644
--- a/src/corelib/io/qurlquery.cpp
+++ b/src/corelib/io/qurlquery.cpp
@@ -642,6 +642,7 @@ QList<QPair<QString, QString> > QUrlQuery::queryItems(QUrl::ComponentFormattingO
QList<QPair<QString, QString> > result;
Map::const_iterator it = d->itemList.constBegin();
Map::const_iterator end = d->itemList.constEnd();
+ result.reserve(d->itemList.count());
for ( ; it != end; ++it)
result << qMakePair(d->recodeToUser(it->first, encoding),
d->recodeToUser(it->second, encoding));