Qt: store the absolute path names of recent files.

That way you can still open a file you recently opened (which was in your pwd)
even if you happen to change directories (as shell-prompt-dwellers such as
myself are wont to do).

(The Gtk GUI already stores absolute paths.)

Change-Id: If29bcc25d680825c659f8eb4f13b108764029652
Reviewed-on: https://code.wireshark.org/review/12483
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Jeff Morriss 2015-12-08 21:47:38 -05:00 committed by Michael Mann
parent 9a59cd8243
commit eb9d7ebb20
1 changed files with 3 additions and 3 deletions

View File

@ -134,10 +134,10 @@ set_last_open_dir(const char *dirname)
extern "C" void
add_menu_recent_capture_file(const gchar *cf_name) {
QString normalized_cf_name = QString::fromUtf8(cf_name);
// QDir cf_path;
QDir cf_path;
// cf_path.setPath(normalized_cf_name);
// normalized_cf_name = cf_path.absolutePath();
cf_path.setPath(normalized_cf_name);
normalized_cf_name = cf_path.absolutePath();
normalized_cf_name = QDir::cleanPath(normalized_cf_name);
normalized_cf_name = QDir::toNativeSeparators(normalized_cf_name);