summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2020-03-11 11:30:51 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-11 08:26:30 -0700
commit285fa8acbceebf5dc87c5c3befe42a2917a3b844 (patch)
tree142efc52856b5f4bded40867a917800c241ebfb6 /desktop-widgets
parentcb28158b9abe10f08142f12f11ddbb5d23686fd5 (diff)
downloadsubsurface-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 'desktop-widgets')
-rw-r--r--desktop-widgets/divelistview.cpp6
-rw-r--r--desktop-widgets/divelistview.h2
-rw-r--r--desktop-widgets/divelogimportdialog.cpp2
-rw-r--r--desktop-widgets/tab-widgets/TabDivePhotos.cpp20
-rw-r--r--desktop-widgets/tab-widgets/TabDiveSite.cpp6
5 files changed, 18 insertions, 18 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 29dabfa36..1f3a20455 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -199,11 +199,11 @@ void DiveListView::reset()
}
// If items were selected, inform the selection model
-void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indexes)
+void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indices)
{
clearSelection();
QItemSelectionModel *s = selectionModel();
- for (const QModelIndex &index: indexes) {
+ for (const QModelIndex &index: indices) {
s->select(index, QItemSelectionModel::Rows | QItemSelectionModel::Select);
// If an item of a not-yet expanded trip is selected, expand the trip.
@@ -420,7 +420,7 @@ void DiveListView::sortIndicatorChanged(int i, Qt::SortOrder order)
if (currentLayout == newLayout) {
sortByColumn(i, order);
} else {
- // clear the model, repopulate with new indexes.
+ // clear the model, repopulate with new indices.
std::vector<int> expandedRows;
if(currentLayout == DiveTripModelBase::TREE)
expandedRows = backupExpandedRows();
diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h
index b31d8039e..275e26779 100644
--- a/desktop-widgets/divelistview.h
+++ b/desktop-widgets/divelistview.h
@@ -60,7 +60,7 @@ slots:
void shiftTimes();
void loadImages();
void loadWebImages();
- void diveSelectionChanged(const QVector<QModelIndex> &indexes);
+ void diveSelectionChanged(const QVector<QModelIndex> &indices);
void currentDiveChanged(QModelIndex index);
void tripChanged(dive_trip *trip, TripField);
private:
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp
index e0d24fd92..ceae878c6 100644
--- a/desktop-widgets/divelogimportdialog.cpp
+++ b/desktop-widgets/divelogimportdialog.cpp
@@ -362,7 +362,7 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList fn, QWidget *parent) : QDia
hw = "";
txtLog = false;
- /* Add indexes of XSLTs requiring special handling to the list */
+ /* Add indices of XSLTs requiring special handling to the list */
specialCSV << SENSUS;
specialCSV << SUBSURFACE;
specialCSV << DL7;
diff --git a/desktop-widgets/tab-widgets/TabDivePhotos.cpp b/desktop-widgets/tab-widgets/TabDivePhotos.cpp
index 775308e3b..921511de4 100644
--- a/desktop-widgets/tab-widgets/TabDivePhotos.cpp
+++ b/desktop-widgets/tab-widgets/TabDivePhotos.cpp
@@ -69,11 +69,11 @@ QVector<QString> TabDivePhotos::getSelectedFilenames() const
QVector<QString> selectedPhotos;
if (!ui->photosView->selectionModel()->hasSelection())
return selectedPhotos;
- QModelIndexList indexes = ui->photosView->selectionModel()->selectedRows();
- if (indexes.count() == 0)
- indexes = ui->photosView->selectionModel()->selectedIndexes();
- selectedPhotos.reserve(indexes.count());
- for (const auto &photo: indexes) {
+ QModelIndexList indices = ui->photosView->selectionModel()->selectedRows();
+ if (indices.count() == 0)
+ indices = ui->photosView->selectionModel()->selectedIndexes();
+ selectedPhotos.reserve(indices.count());
+ for (const auto &photo: indices) {
if (photo.isValid()) {
QString fileUrl = photo.data(Qt::DisplayPropertyRole).toString();
if (!fileUrl.isEmpty())
@@ -114,11 +114,11 @@ void TabDivePhotos::saveSubtitles()
QVector<QString> selectedPhotos;
if (!ui->photosView->selectionModel()->hasSelection())
return;
- QModelIndexList indexes = ui->photosView->selectionModel()->selectedRows();
- if (indexes.count() == 0)
- indexes = ui->photosView->selectionModel()->selectedIndexes();
- selectedPhotos.reserve(indexes.count());
- for (const auto &photo: indexes) {
+ QModelIndexList indices = ui->photosView->selectionModel()->selectedRows();
+ if (indices.count() == 0)
+ indices = ui->photosView->selectionModel()->selectedIndexes();
+ selectedPhotos.reserve(indices.count());
+ for (const auto &photo: indices) {
if (photo.isValid()) {
QString fileUrl = photo.data(Qt::DisplayPropertyRole).toString();
if (!fileUrl.isEmpty()) {
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.cpp b/desktop-widgets/tab-widgets/TabDiveSite.cpp
index 0059c1051..87bed8f92 100644
--- a/desktop-widgets/tab-widgets/TabDiveSite.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveSite.cpp
@@ -107,10 +107,10 @@ void TabDiveSite::on_filterText_textChanged(const QString &text)
QVector<dive_site *> TabDiveSite::selectedDiveSites()
{
- const QModelIndexList indexes = ui.diveSites->view()->selectionModel()->selectedRows();
+ const QModelIndexList indices = ui.diveSites->view()->selectionModel()->selectedRows();
QVector<dive_site *> sites;
- sites.reserve(indexes.size());
- for (const QModelIndex &idx: indexes) {
+ sites.reserve(indices.size());
+ for (const QModelIndex &idx: indices) {
struct dive_site *ds = model.getDiveSite(idx);
sites.append(ds);
}