diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2019-08-03 21:46:20 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2019-08-03 21:45:37 +0000 |
commit | ca432674b106bc6ad4c5de26a020afdd03821609 (patch) | |
tree | 9f9dcf9155e0dbe2bf477af79cb57f83e4d9c5db /ui/qt/models | |
parent | 3109f526cd26394733e6356c1abeee13ce9ec1cb (diff) |
Qt: Write recent before exporting profiles
The selected profile may have unsaved recent settings when exported,
so write the recent file before exporting to ensure that we save
the latest changes.
A side effect is that it's now possible to export a newly created
profile even if it has only default configuration.
Bug: 15965
Change-Id: I7bb6428283789894bd2863e9ddbd130ca56b1219
Reviewed-on: https://code.wireshark.org/review/34172
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/models')
-rw-r--r-- | ui/qt/models/profile_model.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp index cfc563d1c3..8d3de07c35 100644 --- a/ui/qt/models/profile_model.cpp +++ b/ui/qt/models/profile_model.cpp @@ -13,6 +13,7 @@ #include "glib.h" #include "ui/profile.h" +#include "ui/recent.h" #include "wsutil/filesystem.h" #include "epan/prefs.h" @@ -883,6 +884,9 @@ bool ProfileModel::exportProfiles(QString filename, QModelIndexList items, QStri return false; } + /* Write recent file for current profile before exporting */ + write_profile_recent(); + QStringList files = exportFileList(items); if ( files.count() == 0 ) { |