Adds the new item to the recent files. */
| 924 | |
| 925 | /** Adds the new item to the recent files. */ |
| 926 | void RecentFilesAction::appendFile(const QString& filename) |
| 927 | { |
| 928 | // restore the list of recent files |
| 929 | QStringList files = this->files(); |
| 930 | |
| 931 | // if already inside remove and prepend it |
| 932 | files.removeAll(filename); |
| 933 | files.prepend(filename); |
| 934 | setFiles(files); |
| 935 | save(); |
| 936 | |
| 937 | _pimpl->trySaveUserParameter(); |
| 938 | |
| 939 | clearRecentFilesListAction.setEnabled(true); |
| 940 | |
| 941 | Q_EMIT recentFilesListModified(); |
| 942 | } |
| 943 | |
| 944 | static QString numberToLabel(int number) |
| 945 | { |
no test coverage detected