| 1189 | } |
| 1190 | |
| 1191 | void MainWindow::addRecentProcessFile(const QString& recentFile) |
| 1192 | { |
| 1193 | QString recentFilePath = recentFile.trimmed(); |
| 1194 | |
| 1195 | if (recentFilePath.length() && !_recentProcessFiles.contains(recentFilePath)) |
| 1196 | { |
| 1197 | _recentProcessFiles.insert(0, recentFilePath); |
| 1198 | |
| 1199 | if (_recentProcessFiles.count() > MAX_RECENT_PROJECTS) |
| 1200 | { |
| 1201 | _recentProcessFiles.erase( |
| 1202 | _recentProcessFiles.begin() + MAX_RECENT_PROJECTS, _recentProcessFiles.end()); |
| 1203 | } |
| 1204 | |
| 1205 | writeSettings(); |
| 1206 | |
| 1207 | updateRecentProcessesMenu(); |
| 1208 | } |
| 1209 | } |
| 1210 | |
| 1211 | void MainWindow::updateRecentProcessesMenu() |
| 1212 | { |