summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-06-06 16:57:33 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-06-08 11:35:42 +0000
commit52d91eeea4f49d36c18efd39e12f2634992cb63b (patch)
tree59cd35f687bcf5b4d02ce6ce24fc8362fa58a171 /src/plugins
parent1790d374718308dc530b14eb004d1504baa2a5c6 (diff)
downloadqtdeclarative-52d91eeea4f49d36c18efd39e12f2634992cb63b.tar.gz
qtdeclarative-52d91eeea4f49d36c18efd39e12f2634992cb63b.tar.bz2
qtdeclarative-52d91eeea4f49d36c18efd39e12f2634992cb63b.zip
Add 28 QList::reserve() calls
Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp1
-rw-r--r--src/plugins/qmltooling/shared/abstractviewinspector.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
index e61c421bf..9255e4936 100644
--- a/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
+++ b/src/plugins/qmltooling/qmldbg_qtquick2/qquickviewinspector.cpp
@@ -211,6 +211,7 @@ void QQuickViewInspector::setSelectedItems(const QList<QQuickItem *> &items)
return;
QList<QObject*> objectList;
+ objectList.reserve(items.count());
foreach (QQuickItem *item, items)
objectList << item;
diff --git a/src/plugins/qmltooling/shared/abstractviewinspector.cpp b/src/plugins/qmltooling/shared/abstractviewinspector.cpp
index e718cf022..06f622a65 100644
--- a/src/plugins/qmltooling/shared/abstractviewinspector.cpp
+++ b/src/plugins/qmltooling/shared/abstractviewinspector.cpp
@@ -372,6 +372,7 @@ void AbstractViewInspector::sendCurrentObjects(const QList<QObject*> &objects)
ds << QByteArray(EVENT) << m_eventId++ << QByteArray(SELECT);
QList<int> debugIds;
+ debugIds.reserve(objects.count());
foreach (QObject *object, objects)
debugIds << QQmlDebugService::idForObject(object);
ds << debugIds;