Wireshark-commits: [Wireshark-commits] master 1cd2255: Qt: convert UatDialog to model/view pattern,
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1cd22559a8a907263f1d032e8066482b22f8fbe3
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
1cd2255 by Peter Wu (peter@xxxxxxxxxxxxx):
Qt: convert UatDialog to model/view pattern, improve UX
Fixes:
- Fix crash (heap-use-after-free) on removing a record while editing.
- Mark a record as invalid if any of the fields fail the validation.
(Fixes crash in at least the ISAKMP dissector.)
- Prevent saving of invalid UAT entries (e.g. empty UATs).
- Do not close the dialog on pressing Enter/Escape while editing,
close the editor instead.
- Fix HTML injection in the error messages.
Improvements:
- Tab-navigation now works between fields.
- The field editor is now closed once the focus is lost.
- Fields that fail validation are marked (currently with a pink color).
- The error hint selection has become smarter (see comments in
UatDialog::checkForErrorHint).
- Properly recognizes PT_TXTMOD_HEXBYTES formats like "aa:bb"
(previously it would not expect the ":" and report a bad length).
A validator prevents invalid strings from being entered.
- The OK button is disabled when new/edited records are bad. Notably,
existing (possibly invalid) records are skipped. (Bug 7471).
Live validation (while typing in the editor) was dropped during
conversion, but it can be added later if desired.
Drag and drop reordering still needs to be implemented.
Bug: 11714
Bug: 7471
Change-Id: Ic0b6a177f90503fbd65b5001d8a87a10e38f4d64
Reviewed-on: https://code.wireshark.org/review/17994
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 9434f25 TLS(1.3): Add Supported Versions (43) Hello extension
adds 1cd2255 Qt: convert UatDialog to model/view pattern, improve UX
Summary of changes:
ui/qt/CMakeLists.txt | 6 +
ui/qt/Makefile.am | 6 +
ui/qt/uat_delegate.cpp | 195 +++++++++
ui/qt/uat_delegate.h | 57 +++
ui/qt/uat_dialog.cpp | 495 ++++------------------
ui/qt/uat_dialog.h | 31 +-
ui/qt/uat_dialog.ui | 13 +-
ui/qt/uat_model.cpp | 314 ++++++++++++++
ui/qt/uat_model.h | 66 +++
ui/qt/uat_tree_view.cpp | 74 ++++
ui/qt/{capture_info_dialog.h => uat_tree_view.h} | 40 +-
11 files changed, 836 insertions(+), 461 deletions(-)
create mode 100644 ui/qt/uat_delegate.cpp
create mode 100644 ui/qt/uat_delegate.h
create mode 100644 ui/qt/uat_model.cpp
create mode 100644 ui/qt/uat_model.h
create mode 100644 ui/qt/uat_tree_view.cpp
copy ui/qt/{capture_info_dialog.h => uat_tree_view.h} (61%)