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:
Jaye Evins
2025-12-17 21:26:30 -05:00
committed by GitHub
parent aba0f11616
commit 90e236f847
5 changed files with 66 additions and 12 deletions
+14
View File
@@ -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" );