summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 194ea1acb..bbee51b8b 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1025,18 +1025,16 @@ void MainWindow::removeRecentFile(QStringList failedFiles)
}
}
- foreach (QString file, failedFiles)
+ foreach (const QString &file, failedFiles)
files.removeAll(file);
for (int c = 1; c <= 4; c++) {
QString key = QString("File_%1").arg(c);
- if (files.count() >= c) {
+ if (files.count() >= c)
s.setValue(key, files.at(c - 1));
- } else {
- if (s.contains(key))
- s.remove(key);
- }
+ else if (s.contains(key))
+ s.remove(key);
}
s.endGroup();