summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel_p.h
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-09-27 11:19:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-27 18:35:55 +0200
commit978d3d01cfa063017fdce1391b60efb7a4fc8df2 (patch)
treea889a85ca23170e97a639d8db836ee2f35777583 /src/corelib/itemmodels/qitemselectionmodel_p.h
parentedec823c00dfaedd4277a4a7d98a42a79df6deb5 (diff)
Use a QVector to store QPersistentModelIndexes.
QPersistentModelIndex is not so big that it causes very bad QList performance, but considering how we use the container, QVector is fine. We never prepend to the container, we only ever append, clear and iterate over it. Change-Id: If1e53db9252c22340f1e0179b14a460495b5b35d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel_p.h')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel_p.h b/src/corelib/itemmodels/qitemselectionmodel_p.h
index 987ea6d11a..cc278346ff 100644
--- a/src/corelib/itemmodels/qitemselectionmodel_p.h
+++ b/src/corelib/itemmodels/qitemselectionmodel_p.h
@@ -98,8 +98,8 @@ public:
QItemSelection currentSelection;
QPersistentModelIndex currentIndex;
QItemSelectionModel::SelectionFlags currentCommand;
- QList<QPersistentModelIndex> savedPersistentIndexes;
- QList<QPersistentModelIndex> savedPersistentCurrentIndexes;
+ QVector<QPersistentModelIndex> savedPersistentIndexes;
+ QVector<QPersistentModelIndex> savedPersistentCurrentIndexes;
// optimization when all indexes are selected
bool tableSelected;
QPersistentModelIndex tableParent;