void Settings::setMostRecentFile(const QString &filePath) { QStringList currentList; currentList = getRecentFileList(); foreach(const QString &item, currentList) { if (item==filePath) { currentList.removeOne(item); break; } } currentList.push_front(filePath); settings.setValue("File/Recents", currentList); }
void Configuration::removeFromRecentFileList(const QString &toRemove) { QStringList rl = getRecentFileList(); rl.removeAll(toRemove); setRecentFileList(rl); }