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>
This commit is contained in:
parent
f11def94b1
commit
2793069020
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue