aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/bluetooth_hci_summary_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-12-07Improve interface displaying and writing with multiple sectionsJohn Thacker1-1/+2
Update the functions that get an interface name or description to also take the section number in the record (0 if not present.) Store a mapping of SHB number and interface number to global interface number, and provide a function to access it. Use the function to display the correct interface name and description when there are multiple SHBs. Use this information to rewrite interface numbers when writing a pcapng file through wtap dumper, since we don't write additional SHBs to a file when dumping. We could, but we'd have to store exactly when to write the extra SHB when reading the file in sequentially (unlike the other internal blocks, IDB, NRB, and DSBs, that we intentionally move to the start.) Since we're changing the number of sections, perhaps we should edit the SHB options more? Merging handles interface numbers in its own manner, but also needs to know about the per-SHB interface ID to global ID mapping when doing so. Capinfos and capture file properties still require a bit more work for proper output. Fix #16531, fix #18049
2022-07-03Qt: Do not spin new event loop on menu showTomasz Moń1-1/+1
There is no need for nesting event loops when showing menus. Show menus asynchronously to limit possibilities of hard to debug problems related to re-entering event loop.
2022-06-10tap: Adding flags for tap_packetRoland Knall1-3/+3
This allows flags to be passed by the registering listener to the collection of information
2021-07-21First pass pinfo->pool conversionEvan Huus1-1/+1
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure. I also tweaked a few of the docs which got caught up.
2021-03-08Remove modelines in ui/qt.Gerald Combs1-13/+0
Remove the editor modeline blocks from most of the source files in ui/qt by running perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' ) then cleaning up the remaining files by hand. This *shouldn't* affect anyone since - All of the source files in ui/qt use 4 space indentation, which matches the default in our top-level .editorconfig - The one notable editor that's likely to be used on these files and *doesn't* support EditorConfig (Qt Creator) defaults to 4 space indentation.
2021-01-11Qt framework: Dialogs are correctly notified when capture file was closedJirka Novak1-1/+7
The patch reintroduces WiresharkDialog::captureFileClosed() method and calls captureFileClosing() and captureFileClosed() in right order. Both methods call updateWidgets() at its end. All dialogs were reviewed and captureFileClosing/Closed methods updated when appropriate. captureEvent() method in multiple dialogs changed to captureFileClosing/Closed as it does same actions - looks like old style of detecting of capture file closing.
2019-12-21UI: Fix compilation with Qt 5.14Orgad Shaneh1-29/+41
Change-Id: I8adae4609ff2857cb12bc803839ebb2c6afbd264 Reviewed-on: https://code.wireshark.org/review/35517 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-28Qt: Fix 5.13 deprecated warningsRoland Knall1-1/+1
With Qt 5.13 some methods are deprecated. Fixing those warnings Change-Id: Ia290f06f2b681de1d5b437624de77d8a5c2f5266 Reviewed-on: https://code.wireshark.org/review/33761 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-02-11Qt: Fix Crash in empty Bluetooth windowsMichał Łabędzki1-2/+2
Avoid crashed in context menu in Bluetooth windows when there is no any items. Also add missing last column in "Copy All" in HCI Summary (fix console warning). Change-Id: I28af0208c3b1c813d43305f3c0a4bf19f66d3e31 Reviewed-on: https://code.wireshark.org/review/31977 Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-01-01Add a "failed" return for tap packet routines.Guy Harris1-8/+8
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-07-21Add a tap "finish" callback, called when a listener is removed.Guy Harris1-0/+2
Change-Id: Ic6c23dbd39d1adf8f730f1c866e409f731947475 Reviewed-on: https://code.wireshark.org/review/28786 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16Windows: Make sure more native dialogs handle HiDPI.Gerald Combs1-2/+2
Add a WiresharkFileDialog class, which is a thin wrapper around a few QFileDialog functions that sets per-monitor v2 DPI awareness before showing native dialogs and resets the awareness context afterward. Use it where we call QFileDialog::getXXX. Change-Id: Ib711a70aa94b693a2515804a729f666ea7fbd673 Reviewed-on: https://code.wireshark.org/review/27568 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris1-3/+6
Separate the stuff that any record could have from the stuff that only particular record types have; put the latter into a union, and put all that into a wtap_rec structure. Add some record-type checks as necessary. Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2 Reviewed-on: https://code.wireshark.org/review/25696 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>
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-04-04Qt/Bluetooth: add results filter in HCI Summary windowPatryk Nowak1-0/+20
Add ability to display only these HCI commands whose names match specified filter. Currently only simple filtering is implemented (substring search, no regex-matching). Change-Id: I418d3d2d3e7a3b196d5ba05496d31c508e842dec Reviewed-on: https://code.wireshark.org/review/20880 Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org> Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-29Fix "warning C6246: Local declaration hides declaration of the same name in ↵Michael Mann1-2/+0
outer scope" warnings Change-Id: I98edc076fdab40ef1fd05313168011f58e13a4d6 Reviewed-on: https://code.wireshark.org/review/20773 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-12Qt: Remove unneccessary Q_DECLARE_METATYPERoland Knall1-24/+20
Remove unnecessary Q_DECLARE_METATYPE macros and replace calls to QVariant conversions with VariantPointer where necessary Change-Id: Ia4690590095f930bf94644197de7fa30b00ee7ec Reviewed-on: https://code.wireshark.org/review/19611 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-11-04Qt/Bluetooth: Split LE Meta EventsMichal Labedzki1-6/+110
Add 3rd level subtree in Event->LE Meta, because of existance of "Subevent" which is in similar thing to Event or Opcode in CommandComplete. Change-Id: Ib732ab417c5141251736b608de2e4e64b702c20a Reviewed-on: https://code.wireshark.org/review/18667 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-10-22Qt/Bluetooth: Add Display Filter Edit field to HCI Summary dialogueMichal Labedzki1-0/+23
Display Filter can be useful for this summary dialogue, for example to reduce number of frame that were analyzed, like: "frame.number >= 100 && frame.number <= 4674" Change-Id: I19587b9d41f3b253d1ca2683d198f7d7af2ad50f Reviewed-on: https://code.wireshark.org/review/18265 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-10-20Qt/Bluetooth: Add Mark/Unmark functionalityMichal Labedzki1-2/+53
Add Mark/Unmark functionality for tree/table widget items, user can now mark row or cell. Change-Id: I31b9ca128d97da4fb959ae2d92f5c1646ebea478 Reviewed-on: https://code.wireshark.org/review/18266 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-18Rename a function to have a name different from a data object's name.Guy Harris1-2/+2
Change-Id: Iefef8b2161b43900fd81fb1b163a4feee69fd069 Reviewed-on: https://code.wireshark.org/review/18285 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-18Fix wrong local function namesMichal Labedzki1-6/+6
Copy->Paste issue. Change-Id: I77bc755c772df0fb95a9e4ce91b8b3bc8a8e019d Reviewed-on: https://code.wireshark.org/review/18282 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-13Qt/Bluetooth: Implement hover for rowsMichal Labedzki1-0/+2
This improves readability, especially while presenting results to the other people. Change-Id: I1a6fc93c1b858078e171729971561321a4ddd956 Reviewed-on: https://code.wireshark.org/review/16469 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+3
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-3/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-13qt: use #include <file.h> for generated include filesMartin Kaiser1-1/+1
make sure that generated include files are picked up only from the directories set by -I (or /I), not from the current directory if we use #include "file.h", Visual Studio searches for file.h in the same diretory as the source file that includes file.h if we do an out-of-tree build with cmake and the source directory contains files from an in-tree build (done with autotools), we might end up including the wrong file Change-Id: Iaaed2626258b6ff0c12485fe3f436bd03bbb5adf Reviewed-on: https://code.wireshark.org/review/15873 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-10Bluetooth HCI (Qt): Remove Q_UNUSEDAlexis La Goutte1-6/+2
See g21754f43e for detail There is always some other Q_UNUSED but include on #if/#endif... Change-Id: Ib2283660c91787acbf6392841faa3db6aed39438 Reviewed-on: https://code.wireshark.org/review/15803 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-06-08Apply the prefix operator to iterators.Jaap Keuter1-2/+1
Prefix operators are supposed to be more efficient with iterators, so lets use them instead of postfix operators. Change-Id: I3090e4954c5cb67db47c88e2874b1a8ac52aa2cd Reviewed-on: https://code.wireshark.org/review/15546 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-20Qt/Bluetooth: Allow to use Enter button for jump to framesMichal Labedzki1-0/+7
Implement keyPressEvent and do nothing... However it "takes focus" from button box and jump to frame that some items in tree widget point. Change-Id: Ib08f1588f20bce66fa945bf952770600c625233c Reviewed-on: https://code.wireshark.org/review/15455 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-03-03Qt/Bluetooth: HCI Summary: Miscellaneous fixesMichal Labedzki1-1/+5
1. Count vendor commands once 2. Fill Event column in case of Command Status/Command Complete types while displaying command 3. Add missing Status from Connect Complete event 4. Add missing Command Complete events opcodes Change-Id: Ie5a0e373f92f62fcb890cef7ab54762df3bb8a35 Reviewed-on: https://code.wireshark.org/review/14315 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-1/+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-24Add the packet number to the packet_info structure, and use it.Guy Harris1-12/+12
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-2/+2
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-17Try to fix some PVS Studio warningsMichal Labedzki1-21/+28
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 626 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 661 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 678 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 689 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 700 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 711 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 728 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 739 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 750 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 761 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 810 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 867 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 889 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 949 V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 971 V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 1876 V512 A call of the 'memcpy' function will lead to underflow of the buffer 'packet + exported_pdu_headers_size'. androiddump.c 1950 V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 2053 V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 2056 V512 A call of the 'memcpy' function will lead to underflow of the buffer 'packet + exported_pdu_headers_size'. androiddump.c 2122 V590 Consider inspecting this expression. The expression is excessive or contains a misprint. androiddump.c 2207 V590 Consider inspecting this expression. The expression is excessive or contains a misprint. androiddump.c 2227 V530 The return value of function 'freopen' is required to be utilized. androiddump.c 2275 V530 The return value of function 'freopen' is required to be utilized. androiddump.c 2279 V808 'name' object of 'QString' type was created but was not utilized. bluetooth_devices_dialog.cpp 201 V807 Decreased performance. Consider creating a pointer to avoid using the 'ui->tableTreeWidget->headerItem()' expression repeatedly. bluetooth_devices_dialog.cpp 337 V807 Decreased performance. Consider creating a pointer to avoid using the 'item->child(i_item)' expression repeatedly. bluetooth_hci_summary_dialog.cpp 648 V807 Decreased performance. Consider creating a pointer to avoid using the 'ui->tableTreeWidget->headerItem()' expression repeatedly. bluetooth_hci_summary_dialog.cpp 669 Change-Id: Ia81b5f867b2b1e0ee58eed0bd297800774bc37f9 Reviewed-on: https://code.wireshark.org/review/12683 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-15Qt/Bluetooth: Disable go to packet for closed filesMichal Labedzki1-1/+4
Go to packet on close files is not valid (for currently open one). Disable it. Change-Id: Ib7b65c9ea7e94857692c8ac5ddd3971c52ac717f Reviewed-on: https://code.wireshark.org/review/11023 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-17Qt/Bluetooth: Add HCI Summary dialogueMichal Labedzki1-0/+727
HCI Summary dialogue collect HCI Opcodes, HCI Events, Hardware Errors, Statuses and Reasons. Also show occurrence of them. The top level item is group of items (by OGF or types), the second level item is in real command, event, hardware error, status or reason. The third level items are direct link to packet that contains second level item type. Change-Id: I6b6bd02533c4605a2dd2c1f5dfee46f72a0f3fdc Reviewed-on: https://code.wireshark.org/review/9676 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>