aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-05-14 08:28:08 -0700
committerGerald Combs <gerald@wireshark.org>2015-05-14 15:36:24 +0000
commit279306902060eb02a502109f623a0f705fa49c3d (patch)
tree74aba1c7dc9696018bf28e3e191a74e0be52daa3 /ui
parentf11def94b10b62e96c98f9f2e51e8ae75fcb4f69 (diff)
Add a comment explaining completion misbehavior.
Note that field name completion won't work correctly if a field's abbrev doesn't match its protocol filter name. Fixing this is left as an exercise for the reader. Change-Id: Ia9b55f20bf58b8252e27506bcce4a0dd71cc199c Reviewed-on: https://code.wireshark.org/review/8460 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/display_filter_edit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/qt/display_filter_edit.cpp b/ui/qt/display_filter_edit.cpp
index 0afcf5b5ec..415f805282 100644
--- a/ui/qt/display_filter_edit.cpp
+++ b/ui/qt/display_filter_edit.cpp
@@ -464,6 +464,11 @@ void DisplayFilterEdit::buildCompletionList(const QString &field_word)
// Add fields only if we're past the protocol name and only for the
// current protocol.
+ // XXX This incorrectly skips over some fields since field and
+ // protocol names don't always match (see is_from_other_protocol_whitelist
+ // in tools/checkfiltername.pl). Unfortunately if we remove the
+ // startsWith check then completion becomes unbearably slow on
+ // Windows.
if (field_dots > pfname.count('.') && field_word.startsWith(pfname)) {
void *field_cookie;
for (header_field_info *hfinfo = proto_get_first_protocol_field(proto_id, &field_cookie); hfinfo; hfinfo = proto_get_next_protocol_field(proto_id, &field_cookie)) {