| 25 | } |
| 26 | |
| 27 | void RecentFilesListManager::addFile(const QString &filePath) |
| 28 | { |
| 29 | qInfo(Q_FUNC_INFO); |
| 30 | |
| 31 | // Attempt to remove it first to make sure it is not added twice |
| 32 | removeFile(filePath); |
| 33 | |
| 34 | // Set a limit on how many can be in the list |
| 35 | if (recentFiles.size() >= 10) { |
| 36 | recentFiles.removeLast(); |
| 37 | } |
| 38 | |
| 39 | recentFiles.prepend(filePath); |
| 40 | } |
| 41 | |
| 42 | void RecentFilesListManager::removeFile(const QString &filePath) |
| 43 | { |
no test coverage detected