diff options
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDivePhotos.cpp | 20 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveSite.cpp | 6 |
2 files changed, 13 insertions, 13 deletions
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); } |