Theme Editor: Recent documents/projects that no longer exist are now cleared from the menu

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27611 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-07-29 07:38:01 +00:00
parent 5106d938c6
commit 89c1a88dc8

View file

@ -110,7 +110,7 @@ void EditorWindow::loadConfigTab(ConfigDocument* doc)
this, SLOT(tabTitleChanged(QString)));
}
void EditorWindow::loadSettings()
void EditorWindow::loadSettings()
{
QSettings settings;
@ -918,6 +918,16 @@ void EditorWindow::projectToTop(QString file)
void EditorWindow::refreshRecentMenus()
{
/* Clearing any deleted documents */
for(int i = 0; i < recentDocs.count(); i++)
if(!QFile::exists(recentDocs[i]))
recentDocs.removeAt(i--);
/* Clearing any deleted projects */
for(int i = 0; i < recentProjects.count(); i++)
if(!QFile::exists(recentProjects[i]))
recentProjects.removeAt(i--);
/* First hiding all the menu items */
for(int i = 0; i < recentDocsMenu.count(); i++)
recentDocsMenu[i]->setVisible(false);