summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qinputdialog.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-06-22 22:12:27 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-06-23 15:35:59 +0000
commitfece7cdb5daed826ab074b3210327dcfd7ab0e90 (patch)
tree05b99df28e5fb65a81397a9464ad977027559322 /src/widgets/dialogs/qinputdialog.cpp
parenta4d3af961445995337c279e71c861afc213c06f3 (diff)
widgets: Use QList::reserve(), reduces reallocations.
Change-Id: I49cc03f365c77f142f62c8e77505ec09723a44d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qinputdialog.cpp')
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index 9c78f5e9ac..fb52fa4651 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -791,6 +791,7 @@ QStringList QInputDialog::comboBoxItems() const
QStringList result;
if (d->comboBox) {
const int count = d->comboBox->count();
+ result.reserve(count);
for (int i = 0; i < count; ++i)
result.append(d->comboBox->itemText(i));
}