diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-03 23:23:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-05 08:37:39 +0000 |
commit | 198b2f38657987bbd0186e18627da5d7c1ab614a (patch) | |
tree | 98ad26b3e0f3827421c9e0a7744ed0e8fc62226b /src/qml/util | |
parent | 3d12cf7bac7a06a94a60211e2f40017c3c3a7ba0 (diff) |
Add missing QVector::reserve() calls
Change-Id: Iab7c9949941559b4773e5d4a0406dc58cfc70adb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/util')
-rw-r--r-- | src/qml/util/qqmladaptormodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index e043d4e2ee..17f4ffd62b 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -159,7 +159,9 @@ public: signalIndexes.append(propertyId + signalOffset); } if (roles.isEmpty()) { - for (int propertyId = 0; propertyId < propertyRoles.count(); ++propertyId) + const int propertyRolesCount = propertyRoles.count(); + signalIndexes.reserve(propertyRolesCount); + for (int propertyId = 0; propertyId < propertyRolesCount; ++propertyId) signalIndexes.append(propertyId + signalOffset); } |