aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list_model.h
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-06-21 15:51:35 -0400
committerAnders Broman <a.broman58@gmail.com>2017-06-21 21:00:44 +0000
commit16f70b9bb1faf48d985e21fcfa92d1934c2b50f5 (patch)
tree50c21f360ffeac341683420650e0e65092d483e8 /ui/qt/packet_list_model.h
parent6117ff496becee208336847a0cf460c15751ef6d (diff)
Qt: fix sorting of custom columns with multiple fields
Fields like "dns.time || http.time || smb.time" were sorted by column number before. Recognize when all fields are numeric values and then try to sort by number and otherwise fallback to a value comparison. In theory sorting should now also be a bit faster for custom columns because the columnn type is looked up once. Change-Id: Id40d7cce8080d05823d74459fc493ec6ebf80956 Reported-by: Laura Chappell Reviewed-on: https://code.wireshark.org/review/22317 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/packet_list_model.h')
-rw-r--r--ui/qt/packet_list_model.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/packet_list_model.h b/ui/qt/packet_list_model.h
index 3af6c60042..b6236e883a 100644
--- a/ui/qt/packet_list_model.h
+++ b/ui/qt/packet_list_model.h
@@ -106,6 +106,7 @@ private:
int max_line_count_;
static int sort_column_;
+ static int sort_column_is_numeric_;
static int text_sort_column_;
static Qt::SortOrder sort_order_;
static capture_file *sort_cap_file_;
@@ -114,6 +115,7 @@ private:
QElapsedTimer *idle_dissection_timer_;
int idle_dissection_row_;
+ bool isNumericColumn(int column);
private slots:
void emitItemHeightChanged(const QModelIndex &ih_index);