diff options
author | Michael Mann <mmann78@netscape.net> | 2017-10-17 13:57:04 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-21 16:33:03 +0000 |
commit | 61380f950428dc7166647e6b5973415b691e1b70 (patch) | |
tree | 35d60f2e5c2afe9cfbe2b60299485eb5c74323e5 /ui/qt/models/uat_model.cpp | |
parent | 4e3114d01dd2ddbf4044bcd5c91812d3bd3f7fbd (diff) |
Add button in Qt UAT dialog/frame to remove all UAT entries at once.
Change-Id: If5a172cd69beeb0b9a22eb7f6b9e7cb25f350b49
Reviewed-on: https://code.wireshark.org/review/23968
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt/models/uat_model.cpp')
-rw-r--r-- | ui/qt/models/uat_model.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/qt/models/uat_model.cpp b/ui/qt/models/uat_model.cpp index b782247b13..37879ccdbb 100644 --- a/ui/qt/models/uat_model.cpp +++ b/ui/qt/models/uat_model.cpp @@ -333,6 +333,20 @@ bool UatModel::removeRows(int row, int count, const QModelIndex &/*parent*/) return true; } +void UatModel::clearAll() +{ + if (rowCount() < 1) + return; + + beginResetModel(); + uat_clear(uat_); + record_errors.clear(); + dirty_records.clear(); + uat_->changed = TRUE; + endResetModel(); +} + + bool UatModel::copyRow(int dst_row, int src_row) { if (src_row < 0 || src_row >= rowCount() || dst_row < 0 || dst_row >= rowCount()) { |