summaryrefslogtreecommitdiff
path: root/ui/qt/endpoint_dialog.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-04-22 18:31:32 -0700
committerGuy Harris <guy@alum.mit.edu>2016-04-23 01:35:22 +0000
commit948342a487999fcf24913c4a76983c3c6d4df1d9 (patch)
treef5d0a8be115ac03088c45248b2a8ac360dd8a819 /ui/qt/endpoint_dialog.cpp
parent3db13c7bbbc2b8dfd864ffe7278c0f8f5491bfc7 (diff)
downloadwireshark-948342a487999fcf24913c4a76983c3c6d4df1d9.tar.gz
Forcibly update all items if name resolution is turned on or off.
This makes the display change if you turn the name resolution checkbox on or off. Change-Id: I873832b103b61e1e566523a1ae1c4211937c7bae Reviewed-on: https://code.wireshark.org/review/15063 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/endpoint_dialog.cpp')
-rw-r--r--ui/qt/endpoint_dialog.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/ui/qt/endpoint_dialog.cpp b/ui/qt/endpoint_dialog.cpp
index a88e6cd345..1bbbe732df 100644
--- a/ui/qt/endpoint_dialog.cpp
+++ b/ui/qt/endpoint_dialog.cpp
@@ -223,10 +223,8 @@ public:
: TrafficTableTreeWidgetItem (parent, strings) {}
// Set column text to its cooked representation.
- void update(gboolean resolve_names) {
+ void update(gboolean resolve_names, bool force) {
hostlist_talker_t *endp_item = data(ei_col_, Qt::UserRole).value<hostlist_talker_t *>();
- bool ok;
- quint64 cur_packets = data(pkts_col_, Qt::UserRole).toULongLong(&ok);
char *addr_str, *port_str;
if (!endp_item) {
@@ -234,8 +232,13 @@ public:
}
quint64 packets = endp_item->tx_frames + endp_item->rx_frames;
- if (ok && cur_packets == packets) {
- return;
+ if (!force) {
+ bool ok;
+ quint64 cur_packets = data(pkts_col_, Qt::UserRole).toULongLong(&ok);
+
+ if (ok && cur_packets == packets) {
+ return;
+ }
}
addr_str = get_conversation_address(NULL, &endp_item->myaddress, resolve_names);
@@ -504,7 +507,7 @@ EndpointTreeWidget::EndpointTreeWidget(QWidget *parent, register_ct_t *table) :
connect(fa, SIGNAL(triggered()), this, SLOT(filterActionTriggered()));
}
- updateItems();
+ updateItems(false);
}
@@ -529,10 +532,10 @@ void EndpointTreeWidget::tapDraw(void *conv_hash_ptr)
EndpointTreeWidget *endp_tree = static_cast<EndpointTreeWidget *>(hash->user_data);
if (!endp_tree) return;
- endp_tree->updateItems();
+ endp_tree->updateItems(false);
}
-void EndpointTreeWidget::updateItems()
+void EndpointTreeWidget::updateItems(bool force)
{
title_ = proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(table_)));
@@ -574,7 +577,7 @@ void EndpointTreeWidget::updateItems()
QTreeWidgetItemIterator iter(this);
while (*iter) {
EndpointTreeWidgetItem *ei = static_cast<EndpointTreeWidgetItem *>(*iter);
- ei->update(resolve_names_);
+ ei->update(resolve_names_, force);
++iter;
}
setSortingEnabled(true);