URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=552ef8b1f4bc5ced263c82253ed21793ca8e5d5e
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
552ef8b by Peter Wu (peter@xxxxxxxxxxxxx):
Qt: improve extension selection in Save As dialog
The default Qt behavior for extension adjustment is quite bad. When the
file type filter is changed, the extension always becomes "gz" because
"pcap.gz" happens to be the first extension in the list. It also did not
check that the last suffix is actually a valid extension (e.g.
"capture.2018.01" became "capture.2018.gz").
Improvements:
- Respect the "compression" checkbox when adjusting the filename.
- Replace the extension only if it is a known one, append otherwise.
- Use a better default extension (from "wtap_default_file_extension").
Affects only macOS and Linux since Windows has its own native dialog.
See also https://bugreports.qt.io/browse/QTBUG-67993
Bug: 14600
Change-Id: I8cd0788f2abac0c6d7e29490b1ebb381f5a926d0
Reviewed-on: https://code.wireshark.org/review/27186
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 6e4caf3 BOOTP BSDP: Allow "pad" and "end" suboptions.
adds 552ef8b Qt: improve extension selection in Save As dialog
Summary of changes:
ui/qt/capture_file_dialog.cpp | 107 +++++++++++++++++++++++++++++++++---------
ui/qt/capture_file_dialog.h | 6 ++-
2 files changed, 88 insertions(+), 25 deletions(-)