Clear a list of recent files from non-existent files.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-09-09 14:01:57 +03:00
parent 6fa93c7c5f
commit a9e9c0d5ad

View File

@ -368,7 +368,18 @@ void VCommonSettings::SetUndoCount(const int &value)
//---------------------------------------------------------------------------------------------------------------------
QStringList VCommonSettings::GetRecentFileList() const
{
return value(SettingGeneralRecentFileList).toStringList();
const QStringList files = value(SettingGeneralRecentFileList).toStringList();
QStringList cleared;
for (int i = 0; i < files.size(); ++i)
{
if (QFileInfo(files.at(i)).exists())
{
cleared.append(files.at(i));
}
}
return cleared;
}
//---------------------------------------------------------------------------------------------------------------------