aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/simple_statistics_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-02-08Switch stat tap to use wmem_tree_t instead of (sorted) GSList.Michael Mann1-3/+4
Change-Id: I172167eb20793113562b69d1e0e93a4882200404 Reviewed-on: https://code.wireshark.org/review/20019 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-16qt: move free_stat_tables from SimpleStatisticsDialog::fillTree to ↵Dario Lombardo1-1/+10
~SimpleStatisticsDialog. Add a reference count to stat_tap_table_ui to prevent bad deallocations. Bug: 12437 Change-Id: Ib9b1f929d08a574c306dc755ec416ab94a3fd6d3 Reviewed-on: https://code.wireshark.org/review/15920 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-0/+1
Add GeometryStateDialog class to handle load and save dialog geometry. The QDialog class name will be used as window name. For shared classes the UAT name or the statistics title or abbr will be used. Change-Id: I5a019598307fb3861518f41e733de834788184d8 Reviewed-on: https://code.wireshark.org/review/14139 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-29Rename new_stat_tap_ui to stat_tap_table_ui.Guy Harris1-4/+4
A "new" statistics tap UI is a statistics tap UI where the statistics are maintained as tables and common code handles the tables; what matters is the tables, not that it's "new". Change-Id: I7a0e63cfac98c24cd5e7dce973b9a0cc5b6a03ba Reviewed-on: https://code.wireshark.org/review/12897 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29There's no "old" stat_tap_table, so remove "new_" from the name.Guy Harris1-4/+4
Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72 Reviewed-on: https://code.wireshark.org/review/12896 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-01Convert the WSP stats to generic stat API.Gerald Combs1-10/+26
Add support for multiple tables to SimpleStatisticsDialog. Change-Id: I843d901db092d2f2856d3d1a16f29f85fb41374b Reviewed-on: https://code.wireshark.org/review/10339 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-26Rework tapping in Qt dialogs.Gerald Combs1-13/+8
Add cf_cb_file_retap_started and cf_cb_file_retap_finished to file.[ch]. Add their associated signals to CaptureFile. Add registerTapListener and removeTapListeners to WiresharkDialog, which collect and automatically remove tap listeners. Add beginRetapPackets and endRetapPackets, which can be used to wrap critical sections so that we don't delete ourselves while tapping. Don't cancel tapping on close in WiresharkDialog. Use beginRetapPackets and endRetapPackets in WiresharkDialog and FollowStreamDialog. We will likely need to add them elsewhere. Update comments. Change-Id: I1788a6ade0817c31aa3419216df96be5e36b2178 Reviewed-on: https://code.wireshark.org/review/10261 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-20Tap parameter and stats dialog fixups.Gerald Combs1-1/+2
If we run into an error when trying to register a tap listener, return instead of tapping packets. This should fix some (but likely not all) double frees found by Stig. For now close each statistics dialog if we find an error. Note that we might want to keep them open instead. Add checks and cleanups to some of the stats table free routines. Call fillTree once in TapParameterDialog's constructor instead of each time it's shown. Make fillTree a slot which lets us use a delay timer so that the dialog is visible when we retap packets. Change-Id: Id49f2f2a99bc8e5b1d32990024986b3c8b1abe24 Reviewed-on: https://code.wireshark.org/review/10153 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-18Qt: Fix use-after-free patternStig Bjørlykke1-1/+2
QString.toUtf8() returns a QByteArray object and .constData() returns a pointer inside that object. It is not safe to store this pointer as it will become invalid after the statement. Change-Id: I8f54ede75577719008835038934e935cd5feba3f Reviewed-on: https://code.wireshark.org/review/10067 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-07Add ONC RPC program stats.Gerald Combs1-8/+13
Convert ONC RPC program stats to the stat_tap API. Add a "user_data" member to the stat_tap_table_item_type struct. Change-Id: I5cbf000a447ff93d30fa7f098124bdcbc34f2935 Reviewed-on: https://code.wireshark.org/review/9904 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06Fixup stat_tap table freeing.Gerald Combs1-2/+2
As it turns out we *do* need to free table elements. We also need to free the tables themselves and clear the table array. Do so. Change-Id: Ic1c81388eac8f47f74caea0169c79685a83aaff9 Reviewed-on: https://code.wireshark.org/review/9901 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-29Capture file retapping fixups.Gerald Combs1-1/+1
Add CaptureFile::delayedRetapPackets, which starts retapping after the current batch of UI event are processed. Call it in the constructors of various dialogs so that they are shown before tapping starts. This *might* fix a crash found when following large streams from the Conversations dialog. Change-Id: If1b87491621ab7efcc0519f95891d34dcd9d18c1 Reviewed-on: https://code.wireshark.org/review/9818 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08Add SimpleStatisticsDialog.Gerald Combs1-0/+283
To do: - Refactor dynamic menu item placement. Change-Id: I087de9f2fa3c2ff7dc08e5d54bc9c1b984fdd7b1 Reviewed-on: https://code.wireshark.org/review/9561 Reviewed-by: Gerald Combs <gerald@wireshark.org>