Qt: traffic table: remove a tap listener only once
authorMartin Kaiser <wireshark@kaiser.cx>
Sun, 30 Dec 2018 12:24:36 +0000 (13:24 +0100)
committerMichael Mann <mmann78@netscape.net>
Sun, 30 Dec 2018 17:37:20 +0000 (17:37 +0000)
commit6b7c73580ba765a914f5f05873f656df03ab8c4b
tree699caa15f2487d2f939d387baad27d01a9f7c4db
parent932edd087805146c5a6c51dfde227548fc2f679a
Qt: traffic table: remove a tap listener only once

Class TrafficTableTreeWidget is used by the conversation and enpoint
dialogs, both of which are subclasses of WiresharkDialog.

Those dialogs use WiresharkDialog::registerTapListener() to register tap
listeners. When the dialog is closed, those listeners are removed by
WiresharkDialog::removeTapListeners().

TrafficTableTreeWidget's destructor tries to remove its tap listener a
2nd time after WiresharkDialog did its cleanup. This causes warnings

Warn remove_tap_listener(): no listener found with that tap data

Don't call remove_tap_listener() from TrafficTableTreeWidget's
destructor. The destructor is now empty and can be removed completely.

Change-Id: I3143fa1c5116203f4a0be791bd4c5f08135aefb0
Reviewed-on: https://code.wireshark.org/review/31259
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
ui/qt/traffic_table_dialog.cpp
ui/qt/traffic_table_dialog.h