Remove files from Settings::recentFileList(), if they fail to open. (#268)
- i.e. they no longer exist or have been moved - update recent file menu in StartupView as Settings change
This commit is contained in:
@@ -358,6 +358,20 @@ namespace glabels
|
||||
}
|
||||
|
||||
|
||||
void Settings::removeFromRecentFileList( const QString& filePath )
|
||||
{
|
||||
mInstance->beginGroup( "Recent" );
|
||||
|
||||
QStringList list = mInstance->value( "files" ).toStringList();
|
||||
list.removeAll( filePath );
|
||||
mInstance->setValue( "files", list );
|
||||
|
||||
mInstance->endGroup();
|
||||
|
||||
emit mInstance->changed();
|
||||
}
|
||||
|
||||
|
||||
QString Settings::recentPrinter()
|
||||
{
|
||||
mInstance->beginGroup( "Recent" );
|
||||
|
||||
Reference in New Issue
Block a user