aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/wlan_statistics_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-05-24Qt: unchecked dynamic castJaap Keuter1-2/+2
Dynamic cast may yield NULL pointer, hence must be checked before dereferencing it. Easy enough in a conditional. CID 1435488 Change-Id: I8359ab5865795f1b1bea6980b023ff636d6719a6 Reviewed-on: https://code.wireshark.org/review/33316 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-01Add a "failed" return for tap packet routines.Guy Harris1-4/+4
This allows taps that can fail to report an error and fail; a failed tap's packet routine won't be called again, so they don't have to keep track of whether they've failed themselves. We make the return value from the packet routine an enum. Don't have a separate type for the per-packet routine for "follow" taps; they're expected to act like tap packet routines, so just use the type for tap packet routines. One tap packet routine returned -1; that's not a valid return value, and wasn't one before this change (the return value was a boolean), so presume the intent was "don't redraw". Another tap routine's early return, without doing any work, returned TRUE; this is presumably an error (no work done, no need to redraw), so presumably it should be "don't redraw". Clean up some white space while we're at it. Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8 Reviewed-on: https://code.wireshark.org/review/31283 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-01Fix comment end after SPDX identifierStig Bjørlykke1-1/+2
Move */ to a separate line below the SPDX identifier. Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f Reviewed-on: https://code.wireshark.org/review/27211 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-20Constify some method arguments, and don't cast away constness.Guy Harris1-8/+8
Change-Id: I266a724ff672026b3fdf07ac2eb2260f37c04247 Reviewed-on: https://code.wireshark.org/review/25940 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-02Qt: use SPDX identifiers.Dario Lombardo1-14/+1
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3 Reviewed-on: https://code.wireshark.org/review/25563 Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-06WLAN stats: make filter + apply button workMartin Mathieson1-1/+25
Also export as text just the networks. Change-Id: I228d65cb219792a70c6077932dbe9cf65b92eb6e Reviewed-on: https://code.wireshark.org/review/25169 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-07-26Qt: Create models directoryRoland Knall1-1/+1
Following the move for widgets and utils directory, moving models and delegates to the utils directory. Guidelines for this directory are: - Implementation of a model - Implementation of a delegate - Utility class for data storage used by a model Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I3bb868af7d3570437682b722a0cd46c906628570 Reviewed-on: https://code.wireshark.org/review/22790 Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26Qt: Move utils to separate utils directoryRoland Knall1-2/+2
Following the move for widgets directory, moving utils to the utils directory. Guidelines for this directory are: - Generic use but not a widget - Utility functionality used by many classes Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b Reviewed-on: https://code.wireshark.org/review/22602 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-31format_text_wmem -> format_textMichael Mann1-2/+2
All cases of the "original" format_text have been handled to add the proper wmem allocator scope. Remove the "original" format_text and replace it with one that has a wmem allocator as a parameter. Change-Id: I278b93bcb4a17ff396413b75cd332f5fc2666719 Reviewed-on: https://code.wireshark.org/review/19884 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-31format_text -> format_text_wmem for wlan dialogsMichael Mann1-2/+7
format_text_wmem uses NULL scope in GUI dialogs Change-Id: Ifaa342e034de9f99b59169cdf0c7ddc52ff67597 Reviewed-on: https://code.wireshark.org/review/19882 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-30wlan_statistics_dialog (Qt): Fix display when there is no packets_Alexis La Goutte1-2/+5
Make sure we don't pass an invalid value to PercentBarDelegate. Make sure PercentBarDelegate handles invalid values more gracefully. Change-Id: I18f07542be3432d0fcf5dff479eef2ea4d5e7931 Reviewed-on: https://code.wireshark.org/review/18276 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-26Qt: WLAN Statistics performance improvements.Gerald Combs1-3/+27
In the WLAN statistics dialog, add our stations to the tree in the background. This returns control to the user immediately after tapping. Add notes about further performance improvements. Change-Id: Ie7ff818b8d835ecb38f5ff702a0d0e8f2635abb2 Reviewed-on: https://code.wireshark.org/review/18495 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-10-20Qt: remove unused private member (found by clang).Dario Lombardo1-1/+0
Error: ui/qt/wlan_statistics_dialog.cpp:462:9: error: private field 'retry_packets_' is not used [-Werror,-Wunused-private-field] Change-Id: I10785eab098db14a53ef8085421c0f1046c269f3 Reviewed-on: https://code.wireshark.org/review/18337 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-20wlan_statistics_dialog (Qt): Add percent of retryAlexis La Goutte1-12/+21
Change-Id: I1b77805d0bb71cda0ba8296f88854eec7111eff4 Reviewed-on: https://code.wireshark.org/review/18307 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-20wlan_statistics_dialog: Add number of retryAlexis La Goutte1-11/+32
Change-Id: I27194670dcd2e6c2ec6502c562e50ee6925c4c45 Reviewed-on: https://code.wireshark.org/review/18306 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-16Inspired by prevous commit: grep for wlan_mgt turned up a few more ↵Joerg Mayer1-1/+1
occurrences. Fix them. Change-Id: I6661f483f7bf1e34c96467917358dbddf45f808e Reviewed-on: https://code.wireshark.org/review/18216 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-3/+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>
2016-01-23ui: Code cleanupStig Bjørlykke1-1/+1
Fixed code layout to use common style in the file. Mostly whitespace changes. Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2 Reviewed-on: https://code.wireshark.org/review/13504 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-27Qt: Protect against unintentional "no capture file" window statusMichal Labedzki1-0/+2
If capture file was closed and we have some WiresharkDialogs opened, then we still need to know filename of capture file related to specific dialog. Change-Id: I15f0e5176b87713bf747eead64021619d0bdf039 Reviewed-on: https://code.wireshark.org/review/11025 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
2015-10-17qt: add missing initializer (CID 1317258)Dario Lombardo1-1/+2
Change-Id: I0a38d09d025525501173486284fa4ffba3335ce9 Reviewed-on: https://code.wireshark.org/review/10968 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-09-18Fix WLAN statistics header behavior.Gerald Combs1-1/+1
Connect itemSelectionChanged to header label updates instead of currentItemChanged, which seems to be more reliable. Change-Id: I29f8f2144ad6584e0612d43ec3aac5b258f08ebd Reviewed-on: https://code.wireshark.org/review/10570 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-21Multicast and wireless lan statistics fixups.Gerald Combs1-6/+15
Make sure "-z multicast,stat[,filter]" and "-z wlan,stat[,filter]" work. Add some missing "-z" items to the man page. Try to fix some MSVC++ warnings. Change-Id: Ie18e5355d595e351f000f14d82781dcdf33141c3 Reviewed-on: https://code.wireshark.org/review/10184 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-21Try to fix: wlan_statistics_dialog.cpp:466:1: error: unused parameter ↵AndersBroman1-1/+1
‘filter’ [-Werror=unused-parameter] Change-Id: Ib9b2fe245b126f9413dbdcced94c61eacf4d1c5d Reviewed-on: https://code.wireshark.org/review/10177 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-20Add the WLAN statistics dialog.Gerald Combs1-0/+679
Instead of splitting the stats into two lists as with the GTK+ UI, add everything to an expandable tree. This allows viewing nodes on more than one network. Rename the top-level Bluetooth menu item to Wireless and put the WLAN stats dialog there. The Qt UI matches SSIDs (WlanNetworkTreeWidgetItem::isMatch) a bit differently than the GTK+ UI. Try to make the logic as plain as possible since we'll likely have to update it in the future. The addition of a custom BSSID address types means that we can't assume that everything is AT_ETHER. Add routines for checking for broadcast BSSIDs and comparing only the data portions of addresses. Move PercentBarDelegate into its own module. Use it in WlanStatisticsDialog. Change-Id: Ie4214eb00671a890871380c4a07213ebfb7585c6 Reviewed-on: https://code.wireshark.org/review/10171 Reviewed-by: Gerald Combs <gerald@wireshark.org>