From b478df61f54f08e0279d83e2cc11313fbdf28758 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Fri, 14 Apr 2017 11:33:57 +0200 Subject: Qt: Provide both file save and open preferences This is a breaking change. prefs_register_filename_preference hasn't been differentiating between files to be saved and ones to be opened. On GTK, a neutral dialog is used, so no problems there. On Qt, a save dialog has been always used, even in dissectors that were reading configuration files without modification. prefs_register_filename_preference now takes an argument to indicate whether UI could be a save dialog with a warning on overwriting a file, or whether it's a general purpose open file dialog. Qt now does this. Previously no warning was shown on overwriting a file, so it may be used for opening files too without irritating the user. This has been changed, as non-destructive reads should now use the open dialog. Dissectors were changed accordingly. Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018 Reviewed-on: https://code.wireshark.org/review/21086 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- ui/qt/module_preferences_scroll_area.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/qt/module_preferences_scroll_area.h') diff --git a/ui/qt/module_preferences_scroll_area.h b/ui/qt/module_preferences_scroll_area.h index 7b46e8dfe8..458efdf0af 100644 --- a/ui/qt/module_preferences_scroll_area.h +++ b/ui/qt/module_preferences_scroll_area.h @@ -62,7 +62,8 @@ private slots: void stringLineEditTextEdited(const QString &new_str); void rangeSyntaxLineEditTextEdited(const QString &new_str); void uatPushButtonPressed(); - void filenamePushButtonPressed(); + void saveFilenamePushButtonPressed(); + void openFilenamePushButtonPressed(); void dirnamePushButtonPressed(); }; -- cgit v1.2.1