Qt: Add newly saved files to the recent files

Update the recent files list when saving unsaved capture files.

Change-Id: I469fa1f2ce3216c66de328c0b3558c9f9db115e0
Reviewed-on: https://code.wireshark.org/review/17454
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2016-09-02 15:21:46 +02:00
parent 12eee84205
commit 2cac0473be
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,7 @@
#include "ui/capture_globals.h"
#include "ui/main_statusbar.h"
#include "ui/recent.h"
#include "ui/recent_utils.h"
#include "ui/util.h"
#include "ui/preference_utils.h"
@ -1330,6 +1331,8 @@ bool MainWindow::saveAsCaptureFile(capture_file *cf, bool must_support_comments,
cf->unsaved_changes = false; //we just saved so we signal that we have no unsaved changes
updateForUnsavedChanges(); // we update the title bar to remove the *
/* Add this filename to the list of recent files in the "Recent Files" submenu */
add_menu_recent_capture_file(file_name.toUtf8().constData());
return true;
case CF_WRITE_ERROR: