diff options
author | Robert C. Helling <helling@atdotde.de> | 2020-03-11 11:30:51 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-11 08:26:30 -0700 |
commit | 285fa8acbceebf5dc87c5c3befe42a2917a3b844 (patch) | |
tree | 142efc52856b5f4bded40867a917800c241ebfb6 /qt-models/divetripmodel.cpp | |
parent | cb28158b9abe10f08142f12f11ddbb5d23686fd5 (diff) | |
download | subsurface-285fa8acbceebf5dc87c5c3befe42a2917a3b844.tar.gz |
Grammar: replaces 'indexes' by 'indices'
Grammar-nazi ran
git grep -l 'indexes' | xargs sed -i '' -e 's/indexes/indices/g'
to prevent future wincing when reading the source code.
Unfortunatly, Qt itself is infected as in
QModelIndexList QItemSelection::indexes() const
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 1eee924f8..754d5e633 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -1412,19 +1412,19 @@ void DiveTripModelTree::divesSelected(const QVector<dive *> &divesIn, dive *curr // We got a number of dives that have been selected. Turn this into QModelIndexes and // emit a signal, so that views can change the selection. - QVector<QModelIndex> indexes; - indexes.reserve(dives.count()); + QVector<QModelIndex> indices; + indices.reserve(dives.count()); - processByTrip(dives, [this, &indexes] (dive_trip *trip, const QVector<dive *> &divesInTrip) - { divesSelectedTrip(trip, divesInTrip, indexes); }); + processByTrip(dives, [this, &indices] (dive_trip *trip, const QVector<dive *> &divesInTrip) + { divesSelectedTrip(trip, divesInTrip, indices); }); - emit selectionChanged(indexes); + emit selectionChanged(indices); // The current dive has changed. Transform the current dive into an index and pass it on to the view. currentChanged(); } -void DiveTripModelTree::divesSelectedTrip(dive_trip *trip, const QVector<dive *> &dives, QVector<QModelIndex> &indexes) +void DiveTripModelTree::divesSelectedTrip(dive_trip *trip, const QVector<dive *> &dives, QVector<QModelIndex> &indices) { if (!trip) { // This is at the top level. @@ -1436,7 +1436,7 @@ void DiveTripModelTree::divesSelectedTrip(dive_trip *trip, const QVector<dive *> ++j; if (j >= (int)items.size()) break; - indexes.append(createIndex(j, 0, noParent)); + indices.append(createIndex(j, 0, noParent)); } } else { // Find the trip. @@ -1457,7 +1457,7 @@ void DiveTripModelTree::divesSelectedTrip(dive_trip *trip, const QVector<dive *> ++j; if (j >= (int)entry.dives.size()) break; - indexes.append(createIndex(j, 0, idx)); + indices.append(createIndex(j, 0, idx)); } } } @@ -1672,8 +1672,8 @@ void DiveTripModelList::divesSelected(const QVector<dive *> &divesIn, dive *curr // We got a number of dives that have been selected. Turn this into QModelIndexes and // emit a signal, so that views can change the selection. - QVector<QModelIndex> indexes; - indexes.reserve(dives.count()); + QVector<QModelIndex> indices; + indices.reserve(dives.count()); // Since both lists are sorted, we can do this linearly. Perhaps a binary search // would be better? @@ -1683,10 +1683,10 @@ void DiveTripModelList::divesSelected(const QVector<dive *> &divesIn, dive *curr ++j; if (j >= (int)items.size()) break; - indexes.append(createIndex(j, 0, noParent)); + indices.append(createIndex(j, 0, noParent)); } - emit selectionChanged(indexes); + emit selectionChanged(indices); // The current dive has changed. Transform the current dive into an index and pass it on to the view. currentChanged(); |