summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 1baf60d4..aed95616 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -3890,7 +3890,7 @@ void MainWindow::deleteSavegame_clicked()
QRegExp saveSuffix(".ess$");
QStringList deleteFiles;
- foreach (QModelIndex idx, selectedIndexes) {
+ foreach (const QModelIndex &idx, selectedIndexes) {
QString name = idx.data().toString();
SaveGame *save = new SaveGame(this, idx.data(Qt::UserRole).toString());
@@ -4007,15 +4007,11 @@ void MainWindow::fixMods_clicked()
void MainWindow::on_savegameList_customContextMenuRequested(const QPoint &pos)
{
QItemSelectionModel *selection = ui->savegameList->selectionModel();
- QModelIndexList selectedIndexes = selection->selectedIndexes();
- bool multipleSelected = false;
- int selectedCount = selectedIndexes.count();
-
- if ( !selection->hasSelection()) {
+ if (!selection->hasSelection())
return;
- } else if (selectedCount > 1)
- multipleSelected = true;
+
+ bool multipleSelected = (selection->selectedIndexes().count() > 1);
QMenu menu;