subsurface/desktop-widgets
Berthold Stoeger 135ea00d88 implify recent file handling in mainwindow.cpp
The old code used to be unnecessarily complex: the recent files list
was extended for each file and shrunk if a load failed.

By adding a file to the recent file list only if the load succeeded, a
whole method could be removed.

Other changes: keep track of the recent files using a QStringList and
clearly separate the actions:
 - Read recent files from settings [loadRecentFiles()]
 - Write recent files to settings [updateRecentFiles()]
 - Update the recent files actions in the menu [updateRecentFilesMenu()]
 - Add a file to the list of recent files [addRecentFile()]
With this reorganization the code hopefully became more clear.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-30 16:52:22 +01:00
..
2015-10-30 10:36:49 -07:00
2017-11-29 14:05:07 -08:00
2017-04-29 13:32:55 -07:00
2017-04-29 13:32:55 -07:00
2017-11-29 14:05:07 -08:00
2017-05-06 11:12:28 -07:00
2015-10-30 10:36:49 -07:00
2017-04-29 13:32:55 -07:00
2017-04-29 13:32:55 -07:00
2017-11-28 11:36:19 +02:00
2015-10-30 10:36:49 -07:00
2017-11-29 14:05:07 -08:00
2017-11-29 14:05:07 -08:00
2017-04-29 13:32:55 -07:00
2015-10-30 10:36:49 -07:00
2017-04-29 13:32:55 -07:00
2017-03-06 06:40:00 -08:00