summaryrefslogtreecommitdiff
path: root/ui/qt/uat_dialog.ui
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-10-04 01:47:26 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-12 03:53:27 +0000
commit1cd22559a8a907263f1d032e8066482b22f8fbe3 (patch)
tree44c7aae97f98276ce86eca0951bf847e47846f3c /ui/qt/uat_dialog.ui
parent9434f25275b1ff838a9976903f180de7da4b00e4 (diff)
downloadwireshark-1cd22559a8a907263f1d032e8066482b22f8fbe3.tar.gz
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@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/uat_dialog.ui')
-rw-r--r--ui/qt/uat_dialog.ui13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/qt/uat_dialog.ui b/ui/qt/uat_dialog.ui
index 7804d0462e..507e8e90d1 100644
--- a/ui/qt/uat_dialog.ui
+++ b/ui/qt/uat_dialog.ui
@@ -12,7 +12,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="QTreeWidget" name="uatTreeWidget">
+ <widget class="UatTreeView" name="uatTreeView">
<column>
<property name="text">
<string notr="true">1</string>
@@ -97,9 +97,15 @@
</item>
<item>
<widget class="QLabel" name="hintLabel">
+ <property name="styleSheet">
+ <string notr="true">QLabel { color: red; }</string>
+ </property>
<property name="text">
<string/>
</property>
+ <property name="textFormat">
+ <set>Qt::RichText</set>
+ </property>
<property name="wordWrap">
<bool>true</bool>
</property>
@@ -123,6 +129,11 @@
<extends>QLabel</extends>
<header>elided_label.h</header>
</customwidget>
+ <customwidget>
+ <class>UatTreeView</class>
+ <extends>QTreeView</extends>
+ <header>uat_tree_view.h</header>
+ </customwidget>
</customwidgets>
<resources>
<include location="../../image/toolbar.qrc"/>