Tue, 06 Aug 2013 16:23:16 +0300
updates to recent files menu
src/gui.cpp | file | annotate | diff | comparison | revisions |
--- a/src/gui.cpp Tue Aug 06 13:52:32 2013 +0300 +++ b/src/gui.cpp Tue Aug 06 16:23:16 2013 +0300 @@ -147,13 +147,17 @@ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= void ForgeWindow::updateRecentFilesMenu() { + QStringList files = io_recentfiles.value.split ("@", QString::SkipEmptyParts); + QStringListIterator it (files); + // First, clear any items in the recent files menu for (QAction* recent : m_recentFiles) delete recent; m_recentFiles.clear(); - List<str> files = container_cast<QStringList, List<str>> (io_recentfiles.value.split ("@")); - for (str file : c_rev<str> (files)) { + it.toBack(); + while (it.hasPrevious()) { + str file = it.previous(); QAction* recent = new QAction (getIcon ("open-recent"), file, this); connect (recent, SIGNAL (triggered()), this, SLOT (slot_recentFile()));