Clear a list of recent files from non-existent files.
--HG-- branch : develop
This commit is contained in:
parent
6fa93c7c5f
commit
a9e9c0d5ad
|
@ -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;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user