wireshark/ui/qt/widgets
João Valverde 0abe10e040 dfilter: Fix "!=" relation to be free of contradictions
Wireshark defines the relation of equality A == B as
A any_eq B <=> An == Bn for at least one An, Bn.
More accurately I think this is (formally) an equivalence
relation, not true equality.

Whichever definition for "==" we choose we must keep the
definition of "!=" as !(A == B), otherwise it will
lead to logical contradictions like (A == B) AND (A != B)
being true.

Fix the '!=' relation to match the definition of equality:
  A != B <=> !(A == B) <=> A all_ne B <=> An != Bn, for
every n.

This has been the recomended way to write "not equal" for a
long time in the documentation, even to the point where != was
deprecated, but it just wasn't implemented consistently in the
language, which has understandably been a persistent source
of confusion. Even a field that is normally well-behaved
with "!=" like "ip.src" or "ip.dst" will produce unexpected
results with encapsulations like IP-over-IP.

The opcode ALL_NE could have been implemented in the compiler
instead using NOT and ANY_EQ but I chose to implement it in
bytecode. It just seemed more elegant and efficient
but the difference was not very significant.

Keep around "~=" for any_ne relation, in case someone depends
on that, and because we don't have an operator for true equality:
  A strict_equal B <=> A all_eq B <=> !(A any_ne B).
If there is only one value then any_ne and all_ne are the same
comparison operation.

Implementing this change did not require fixing any tests so it
is unlikely the relation "~=" (any_ne) will be very useful.

Note that the behaviour of the '<' (less than) comparison relation
is a separate, more subtle issue. In the general case the definition
of '<' that is used is only a partial order.
2021-10-24 06:55:54 +00:00
..
additional_toolbar.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
additional_toolbar.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
apply_line_edit.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
apply_line_edit.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
byte_view_text.cpp Qt: ByteView make hover configurable 2021-09-13 15:33:46 +00:00
byte_view_text.h Qt: ByteView make hover configurable 2021-09-13 15:33:46 +00:00
capture_filter_combo.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
capture_filter_combo.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
capture_filter_edit.cpp Qt: stop capture syntax worker thread on exit 2021-08-29 08:16:32 +00:00
capture_filter_edit.h Qt: stop capture syntax worker thread on exit 2021-08-29 08:16:32 +00:00
clickable_label.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
clickable_label.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
copy_from_profile_button.cpp Qt: Cleanup space inside parentheses 2019-11-17 20:43:10 +00:00
copy_from_profile_button.h Qt: Move CopyFrom from menu to button 2019-08-26 06:34:31 +00:00
display_filter_combo.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
display_filter_combo.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
display_filter_edit.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
display_filter_edit.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
dissector_tables_view.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
dissector_tables_view.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
drag_drop_toolbar.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
drag_drop_toolbar.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
drag_label.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
drag_label.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
editor_file_dialog.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
editor_file_dialog.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
elided_label.cpp Qt: UAT editor column widths, italic pathname 2020-12-04 09:33:10 +00:00
elided_label.h Qt: Use a lighter link color in dark mode. 2019-06-25 20:31:41 +00:00
expert_info_view.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
expert_info_view.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
export_objects_view.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
export_objects_view.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
field_filter_edit.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
field_filter_edit.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
filter_expression_toolbar.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
filter_expression_toolbar.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
find_line_edit.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
find_line_edit.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
follow_stream_text.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
follow_stream_text.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
interface_toolbar_lineedit.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
interface_toolbar_lineedit.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
label_stack.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
label_stack.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
overlay_scroll_bar.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
overlay_scroll_bar.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
packet_list_header.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
packet_list_header.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
pref_module_view.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
pref_module_view.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
profile_tree_view.cpp ProfileTreeView: fix a memory leak 2020-04-26 06:13:45 +00:00
profile_tree_view.h ProfileTreeView: fix a memory leak 2020-04-26 06:13:45 +00:00
qcustomplot.cpp Qt: Fix clang -Wmisleading-indentation 2021-06-07 00:20:14 +00:00
qcustomplot.h QCustomPlot: Update external library to version 2.1.0 2021-04-03 17:56:01 +00:00
range_syntax_lineedit.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
range_syntax_lineedit.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
rtp_audio_graph.cpp Remove unneeded modelines in ui. 2021-04-20 07:43:39 +00:00
rtp_audio_graph.h Remove unneeded modelines in ui. 2021-04-20 07:43:39 +00:00
splash_overlay.cpp Qt: Use new-style signals+slots in more places. 2021-10-11 16:32:49 +00:00
splash_overlay.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
splash_overlay.ui Qt: Move widgets to sub-directory 2019-07-01 06:55:45 +00:00
stock_icon_tool_button.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
stock_icon_tool_button.h Qt: Remove more Q_OBJECT macro calls. 2021-10-09 17:07:03 -07:00
syntax_line_edit.cpp dfilter: Fix "!=" relation to be free of contradictions 2021-10-24 06:55:54 +00:00
syntax_line_edit.h Qt: Handle dark mode in syntax highlighting. 2020-10-06 19:24:59 +00:00
tabnav_tree_view.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
tabnav_tree_view.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
wireless_timeline.cpp wireless timeline: add a destructor to free the hash table. 2021-06-28 14:18:41 -07:00
wireless_timeline.h wireless timeline: add a destructor to free the hash table. 2021-06-28 14:18:41 -07:00
wireshark_file_dialog.cpp Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00
wireshark_file_dialog.h Remove modelines in ui/qt. 2021-03-08 18:11:32 +00:00