mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-12 17:19:05 -05:00
QCMakeCacheView: prever QVector over QList
This commit is contained in:
@@ -429,7 +429,7 @@ QCMakePropertyList QCMakeCacheModel::properties() const
|
|||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QModelIndex> idxs;
|
QVector<QModelIndex> idxs;
|
||||||
idxs.append(this->index(0, 0));
|
idxs.append(this->index(0, 0));
|
||||||
|
|
||||||
// walk the entire model for property entries
|
// walk the entire model for property entries
|
||||||
@@ -454,7 +454,7 @@ QCMakePropertyList QCMakeCacheModel::properties() const
|
|||||||
(idxs.last().row() + 1) >= rowCount(idxs.last().parent()) ||
|
(idxs.last().row() + 1) >= rowCount(idxs.last().parent()) ||
|
||||||
#endif
|
#endif
|
||||||
!idxs.last().sibling(idxs.last().row() + 1, 0).isValid())) {
|
!idxs.last().sibling(idxs.last().row() + 1, 0).isValid())) {
|
||||||
idxs.removeLast();
|
idxs.remove(idxs.size() - 1);
|
||||||
}
|
}
|
||||||
if (!idxs.isEmpty()) {
|
if (!idxs.isEmpty()) {
|
||||||
idxs.last() = idxs.last().sibling(idxs.last().row() + 1, 0);
|
idxs.last() = idxs.last().sibling(idxs.last().row() + 1, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user