diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-06 16:57:33 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-08 11:35:42 +0000 |
commit | 52d91eeea4f49d36c18efd39e12f2634992cb63b (patch) | |
tree | 59cd35f687bcf5b4d02ce6ce24fc8362fa58a171 /tools/qmlplugindump | |
parent | 1790d374718308dc530b14eb004d1504baa2a5c6 (diff) |
Add 28 QList::reserve() calls
Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tools/qmlplugindump')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 96c23ae268..c7539ac874 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -685,7 +685,9 @@ private: qml->writeScriptBinding(QLatin1String("name"), enquote(QString::fromUtf8(e.name()))); QList<QPair<QString, QString> > namesValues; - for (int index = 0; index < e.keyCount(); ++index) { + const int keyCount = e.keyCount(); + namesValues.reserve(keyCount); + for (int index = 0; index < keyCount; ++index) { namesValues.append(qMakePair(enquote(QString::fromUtf8(e.key(index))), QString::number(e.value(index)))); } |