diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2017-11-30 11:52:42 +0100 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-11-30 16:52:22 +0100 |
commit | 135ea00d88742714e66915b216d0d8d408df7248 (patch) | |
tree | 5cf1a16b7096b3783ef537193d678a246d517d6d /desktop-widgets/groupedlineedit.h | |
parent | 625298a7b86688ee70de4bccb8fcff61f96650db (diff) | |
download | subsurface-135ea00d88742714e66915b216d0d8d408df7248.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/groupedlineedit.h')
0 files changed, 0 insertions, 0 deletions