From eb9d7ebb20976a57ba9693f5f7b5277675849471 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Tue, 8 Dec 2015 21:47:38 -0500 Subject: [PATCH] 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 Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte Reviewed-by: Michael Mann --- ui/qt/wireshark_application.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index 7e683db130..d7a3671331 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -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);