aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-09-30Qt/PacketList: read packet record in private bufferPeter Wu1-4/+13
To prevent potential interference with other users of the capture file, read data in a private buffer instead of reusing the one from capFile. An accidental (?) change in commit v2.9.0rc0-2001-g123bcb0362 resulted in "cf_read_record" reallocating the capture_file->buf buffer. That issue combined with the current behavior would result in a crash when ignoring a packet followed by two times opening a context menu: ==32187==ERROR: AddressSanitizer: heap-use-after-free on address 0x7fda91642800 at pc 0x55a98f3faaa7 bp 0x7fffa2807860 sp 0x7fffa2807858 READ of size 1 at 0x7fda91642800 thread T0 #0 0x55a98f3faaa6 in QByteArray::operator[](int) const /usr/include/qt/QtCore/qbytearray.h:476:47 #1 0x55a9901006eb in ByteViewText::drawLine(QPainter*, int, int) ui/qt/widgets/byte_view_text.cpp:370:35 #2 0x55a9900fd109 in ByteViewText::paintEvent(QPaintEvent*) ui/qt/widgets/byte_view_text.cpp:217:9 ... #50 0x55a98e9fd32a in PacketList::contextMenuEvent(QContextMenuEvent*) ui/qt/packet_list.cpp:614:15 ... 0x7fda91642800 is located 0 bytes inside of 3038371-byte region [0x7fda91642800,0x7fda919284a3) freed by thread T0 here: #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99) #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164 #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2 #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7 #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7 #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7 #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8 #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10 #8 0x55a98ea0b725 in PacketList::getFilterFromRowAndColumn() ui/qt/packet_list.cpp:1041:14 #9 0x55a98e94e4a1 in MainWindow::setMenusForSelectedPacket() ui/qt/main_window_slots.cpp:1175:39 previously allocated by thread T0 here: #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99) #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164 #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2 #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7 #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7 #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7 #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8 #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10 #8 0x55a98e6e0bde in cf_select_packet file.c:3777:8 #9 0x55a98e9ea2ff in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:420:9 This should be fixed now by I4f1264a406a28c79491dcd77c552193bf3cdf62d, but let's avoid the shared buffer. It's not exactly a hot code path anyway. Change-Id: I548d7293a822601f4eb882672477540f066a066b Reviewed-on: https://code.wireshark.org/review/29921 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-13Start renaming SSL to TLS.Gerald Combs1-1/+1
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS" over "SSL" in user interface text and in the documentation. Fix the test_tls_master_secret test while we're here. Bug: 14922 Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8 Reviewed-on: https://code.wireshark.org/review/29649 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-10Qt: Restore column visibility when loading packetsStig Bjørlykke1-6/+8
Always restore column visibility when loading packets to avoid some situations where the column hidden state was incorrect. This fixes the following scenario: - Apply a column and hide it using the column popup menu - Apply another column and remove it using the column popup menu - Close and reopen the capture file - Observe the hidden column is shown, but with wrong width Change-Id: I00531907b2383c6605a2d62e8243092906037d0c Reviewed-on: https://code.wireshark.org/review/29516 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-02prefs: Remove prefs.gui_use_pref_saveStig Bjørlykke1-15/+5
This setting was only used in GTK. Change-Id: If184c61e4e081992e517f480b4faf129b81508c1 Reviewed-on: https://code.wireshark.org/review/29388 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-01Qt: Improve fetching preferences from the packet list.Stig Bjørlykke1-0/+1
The Lua fake item will not give preferences for the last protocol in the packet, so avoid this. The Lua fake item is always added when having a Lua post-dissector, even if the post-dissector does not add any elements to the tree. Change-Id: I43427bf522a32feebd44f192888e73b5607e6fff Reviewed-on: https://code.wireshark.org/review/29377 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-30Qt: fix memleaks on opening a context menuPeter Wu1-0/+3
FrameInformation was never deallocated, leaking the whole pinfo scope. Fix a dealloc-alloc-mismatch (packet_data_ was g_memdup'd). Attach the DataPrinter menu actions to the action group instead of the singleton DataPrinter instance, this enables freeing the actions when the submenu is gone rather than clearing this at program exit. Reported by ASAN. Change-Id: If13af94a60b07b0e52973ccc5c437ef987bfb394 Fixes: v2.5.0rc0-1627-g8a6ea0e454 ("Qt: Further cleanup ByteView") Reviewed-on: https://code.wireshark.org/review/27844 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-30Qt: fix memleak in PacketList::contextMenuEventPeter Wu1-0/+1
Change-Id: I925d2e1529a70aaf403896a4d7df3f491265916d Fixes: v1.99.7rc0-225-g26dacfc8c3 ("Qt: Add protocol preferences menus.") Reviewed-on: https://code.wireshark.org/review/27831 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-25Qt: Configure the selection color via the preferencesPaul Zander1-56/+104
The active selection color and inactive selection color can be configured via Edit / Preferences / Font and Colors There are 3 styles that can be used for the selection color: Default: legacy behavior Flat: Use background and foreground color with no gradient. Gradient: Use background and foreground color with a gradient. Bug: 14714 Change-Id: Ieca293bb9830d2c5702949d0459d1d6f679e41e4 Reviewed-on: https://code.wireshark.org/review/27701 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-17Qt: fix issue found by PVS Studio (V519)Alexis La Goutte1-4/+2
The 'dp_ratio' variable is assigned values twice successively Change-Id: Iac3bcefe61c3fe2f628f046ee6f77377fe7dd775 Reviewed-on: https://code.wireshark.org/review/27598 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-09Qt: Update frame selected in several casesStig Bjørlykke1-7/+10
Ensure that frameSelected(0) is emitted when not having a proto tree field selected because of: 1. No match when trying to restore selected field 2. Search selects a packet with no field to select 3. Current packet is deselected This will disable functionality which requires a selected field and updates the status bar according to selected field. Bug: 14658 Change-Id: I158fae4f26c02f718cee0030ef9e38b597876381 Reviewed-on: https://code.wireshark.org/review/27395 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-04-30Qt: Make the selected packet in the packet list more clear.Paul Zander1-12/+24
When using coloring rules the selected packet is sometime hard to recognize. The stylesheet of the packet list is extended for this. Bug: 14621 Change-Id: Ied465e0e211b3c11e69cb71f89988eb45622dd72 Reviewed-on: https://code.wireshark.org/review/27141 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-17Remove some GTK+-only code.Gerald Combs1-6/+0
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1 Reviewed-on: https://code.wireshark.org/review/26958 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-04-16Qt: Rename packet_list_enable_colorStig Bjørlykke1-1/+1
Rename packet_list_enable_color() to packet_list_recolor_packets() to reflect what it does. Remove the call from where it's not needed. Change-Id: I55dd1a9af8f5b1dbd83b06136a5bbcfddea06cdb Reviewed-on: https://code.wireshark.org/review/26959 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11Qt: Disable collapsible children in the main window.Gerald Combs1-0/+4
Set the childrenCollapsible property to false in the main window splitters. Set the minimum size for the packet list, proto tree, and byte views to a small (one em), consistent, and nonzero value. Otherwise it's easy to inadvertently end up with a hidden main window view. Bug: 14478 Change-Id: I07a352cf2cf0375829ae2e0cb53b2a7d717dbb7d Reviewed-on: https://code.wireshark.org/review/26847 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-04-05Qt: Remove checks for version below 5.2Roland Knall1-4/+0
This stops the main source from being buildable by Qt 4.x Change-Id: I61edbae04ac2b3bf0ae8ee8e09d335083945c176 Reviewed-on: https://code.wireshark.org/review/26756 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-15Epan+Qt: Invalidate cached column strings.Gerald Combs1-4/+6
Add col_data_changed, which checks to see if we have updated column info. Add col_append_frame_number, which adds a frame number and sets col_data_changed. Call col_append_frame_number instead of col_append_fstr from some dissectors. Add PacketListRecord::invalidateAllRecords, which invalidates any cached record data. Add PacketListModel::invalidateAllColumnStrings which calls invalidateAllRecords and signals that our data has changed. Call invalidateAllColumnStrings when we have new name resolution or column information. Bug: 11414 Bug: 11468 Change-Id: I2671594a722f4f9436fe1df84d43489a148e0cee Reviewed-on: https://code.wireshark.org/review/26373 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-03-01Windows: Remove cruft for unsupported versonsGraham Bloice1-12/+3
Remove all the existing LoadDLL\GetProcAddress combinations that allowed conditional Win32 API usage if supported on the running OS version. All the required functions are present in the versions we support. Change-Id: Ibc43e51cefcd1c7562d4e251784362509f224ed6 Reviewed-on: https://code.wireshark.org/review/26215 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-02-27Qt/USB: Allow USB src/dst addresses to be selected for columnsPeter Wu1-5/+17
Make "Prepare a Filter" from the Source and Destination columns work for USB source and destination address, this value must be quoted as well. Change-Id: Ib7a772050c204e716781cc27f9eddbdb7971e547 Reviewed-on: https://code.wireshark.org/review/26096 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris1-1/+1
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: Keep auto-scroll when starting a new captureStig Bjørlykke1-3/+5
Avoid turning off actionGoAutoScroll when going to the first packet when starting a new capture. Bug: 14257 Change-Id: I676139696cf4917b779c5fd390d7a22fb373a6b5 Reviewed-on: https://code.wireshark.org/review/25568 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-15Qt: change obsolete qVariantFromValue into QVariant::fromValue.Dario Lombardo1-3/+3
Change-Id: I767b06c0e316347cdb28b769f1032e6d44cba45b Reviewed-on: https://code.wireshark.org/review/25321 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-04Convert preference dialog to use more models.Michael Mann1-1/+2
Convert Advanced view and Modules view to use a single base model, loading the preferences once and then filter and display what they need with QSortFilterProxyModel derived classes. Convert the PreferencePane "types" to just strings. This allows a more straightforward relationship between the "special" modules that need custom widgets for preference manipulation and it also removes dependency on preferences_dialog.h for many files. Change-Id: I091deb3061564aa4d1564e9ca1c792715961b083 Reviewed-on: https://code.wireshark.org/review/25134 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-28Qt: Remove duplicate copy actionsRoland Knall1-118/+90
Remove the final copy actions from MainWindow and use DataPrinter instead. This way, MainWindow no longer is involved in copying data, and the actions purely are defined by DataPrinter Change-Id: Ib70ad6394dee501bb2c8d58c9d174a0eb04b47de Reviewed-on: https://code.wireshark.org/review/25031 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-15Qt: Switch ProtoTree to a treeview+model.Gerald Combs1-15/+3
Add a ProtoTreeModel and use it in ProtoTree. This should make the UI more responsive when we have lots of items in the tree. Change-Id: Id26e6bcff84663867a8da17fd9ae86ff639b633f Reviewed-on: https://code.wireshark.org/review/24774 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>
2017-12-08Have the frame_tvbuff.c routines not use the global cfile.Guy Harris1-1/+3
Have the routines that create them take a pointer to a struct packet_provider_data, store that in the tvbuff data, and use it to get the wtap from which packets are being read. While we're at it, don't include globals.h in any header files, and include it in source files iff the source file actually uses cfile. Add whatever includes that requires. Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229 Reviewed-on: https://code.wireshark.org/review/24733 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08Move the frame_set stuff back into the capture_file structure.Guy Harris1-2/+2
libwireshark now expects an epan_t to be created with a pointer to a "packet provider" structure; that structure is opaque within libwireshark, and a pointer to it is passed to the callbacks that provide interface names, interface, descriptions, user comments, and packet time stamps, and that set user comments. The code that calls epan_new() is expected to provide those callbacks, and to define the structure, which can be used by the providers. If none of the callbacks need that extra information, the "packet provider" structure can be null. Have a "file" packet provider for all the programs that provide packets from a file. Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0 Reviewed-on: https://code.wireshark.org/review/24731 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-04Put the structure of a capture_file back in cfile.h.Guy Harris1-1/+0
The split isn't necessary now that epan no longer uses the capture_file structure. Change-Id: Ia232712a2fb5db511865805518e8d03509b2167f Reviewed-on: https://code.wireshark.org/review/24693 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-04Move the parts of a capture_file used by libwireshark to a new structure.Guy Harris1-2/+2
Embed one of those structures in a capture_file, and have a struct epan_session point to that structure rather than to a capture_file. Pass that structure to the routines that fetch data that libwireshark uses when dissecting. That separates the stuff that libwireshark expects from the stuff that it doesn't look at. Change-Id: Ia3cd28efb9622476437a2ce32204597fae720877 Reviewed-on: https://code.wireshark.org/review/24692 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03Use cfile.h to define the capture_file type.Guy Harris1-0/+1
Have cfile-int.h declare the structure, and use it in files that directly access the structure. Have cfile.h just incompletely declare the structure and include it rather than explicitly declaring it in source files or other header files. Never directly refer to struct _capture_file except when typedeffing capture_file. Add #includes as necessary, now that cfile.h doesn't drag in a ton of Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556 Reviewed-on: https://code.wireshark.org/review/24686 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-23Qt: Add menu option to remove all packet commentsMichael Mann1-0/+19
Bug: 14186 Change-Id: I8793078ea50379b2f9697787e6b7a8ab2d9e3e0e Reviewed-on: https://code.wireshark.org/review/24558 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-13Qt: Really fix the packet list selectionRoland Knall1-2/+2
Really fix the selection of a row in the packet list Change-Id: I87ab36146bd9b2a130f443717ce73609a1c0b656 Reviewed-on: https://code.wireshark.org/review/24397 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-12Qt: Select correct packet from listStig Bjørlykke1-2/+1
Change-Id: Id29d74506f7f009b7f14a86d8fc7c299711c4c2c Reviewed-on: https://code.wireshark.org/review/24393 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-11-12Qt: Rename packetSelection to frameSelectedRoland Knall1-4/+10
In order to consolidate the interfaces between certain parts of the UI, the signal emitted after a frame change has occured, has to include the number of the frame. This led to two signals for frame change, and therefore packetSelection is to be removed. Change-Id: I24e0e0890291d2243935b0c48387beb66904bfa3 Reviewed-on: https://code.wireshark.org/review/24377 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-08Qt: Further cleanup ByteViewRoland Knall1-10/+15
This further separates ByteView and the rest of the system. Using FieldInformation and DataPrinter, this is the final cleanup of the ByteViewTab Change-Id: If41521167527cf5664c2564cdd0d45fea0f3f612 Reviewed-on: https://code.wireshark.org/review/22783 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-31ByteViewText: Remove epan dependancyRoland Knall1-17/+0
Remove all dependancy for the byte_view_text from the epan system, and therefore cleanly separate data and display for further separation of dissection and view Change-Id: Id1ee91b93da4511afa95f24da4cbbf39cbb89b1f Reviewed-on: https://code.wireshark.org/review/24050 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-28Convert to using find_conversation_pinfo where appropriateMichael Mann1-2/+1
This makes it easier to identify the simpler/common conversations Change-Id: I7094f23e49156ee27f5f72c8e130308470f3e462 Reviewed-on: https://code.wireshark.org/review/24145 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-15Rename ui_util.h -> ws_ui_util.hPeter Wu1-1/+1
In preparation for possibly using AUTOUIC in CMake which treats "ui_*.h" files specially, rename ui_util.h. No other changes. Change-Id: Id026572c000b713ff0e9388dc7fff8d81d4df73e Reviewed-on: https://code.wireshark.org/review/23916 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-09-20qt: Fix some leaked menu objectsMikael Kanstrup1-5/+5
Calling QPushButton.setMenu and QMenu.addMenu does not transfer ownership of the menu. Fix some leaks by letting "receiving" object act parent for the menu object. Bug: 14071 Change-Id: Id4edaf895503ef5dd4597eac99c2cdd6ad09b2ff Reviewed-on: https://code.wireshark.org/review/23600 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>
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-07-17Rename cf_get_comment() to reflect what comment it gets.Guy Harris1-2/+2
Change-Id: Id3b0430a1d462b29833259462536ed4cb0424f77 Reviewed-on: https://code.wireshark.org/review/22662 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-11Qt: Move all utility widgets to widgets subdirectoryRoland Knall1-1/+1
Move all utility widgets to the widgets subdirectory and add separate source_group for their files Correct some alphabetization in ui/qt/CMakeLists.txt noticed during compare. Change-Id: I2d664edc2b32f126438fb673ea53a5ae94cd43d1 Reviewed-on: https://code.wireshark.org/review/22531 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-22Qt: Restore multi custom column width and alignStig Bjørlykke1-3/+1
Put custom column field settings in quotes in the recent file to support multi custom columns which contains space. Otherwise the space will be removed in prefs_get_string_list() and the field will not match when reading the recent file. Change-Id: Ic6e2b1e02d68970a4e11fbecbe55a7b10f8b10dd Reviewed-on: https://code.wireshark.org/review/22349 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>
2017-06-20Qt: Turn off auto scroll when going to a packetStig Bjørlykke1-1/+16
When going to a packet (first, last, next, prev and specific) during capture we must turn off auto scroll to let the packet be shown in the packet list. Change-Id: If1c615eb4d422c3b4c0418114064f7a4a0b75b35 Reviewed-on: https://code.wireshark.org/review/22244 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>
2017-06-20Don't scroll back to the selected frame when we get name resolution updates.Jeff Morriss1-4/+11
With live or large capture files and asynchronous name resolution this can cause serious scrolling issues as the name resolutions come in. Bug: 12074 Change-Id: I1a5cca410c0608927b32e9e7107885370caf14d7 Reviewed-on: https://code.wireshark.org/review/22245 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-20Qt: Prevent moving other columns on drag and dropPeter Wu1-1/+35
This workaround prevents moving around other columns during drag and drop and also transfers the sorting order to the new position. Bug: 13183 Ping-Bug: 13540 Change-Id: I4609c63557bf3abf06ba417ac1b40cac22a82abc Reviewed-on: https://code.wireshark.org/review/21022 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-2/+2
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X 10.0", for example. It was "Mac OS X" until 10.8 (although 10.7 was sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS X" from 10.8 to 10.11. Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3 Reviewed-on: https://code.wireshark.org/review/20933 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-03Qt: Fix goto next/prev packet toolbar buttonsStig Bjørlykke1-4/+6
Use bitwise AND to check if a modifier bit is set. Also changed from MetaModifier to AltModifier to match the comment and the modifier key used in "Next/Previous Packet in History". Change-Id: I89072a1dfdd14a2beb7344a672cbc18a3ace8924 Reviewed-on: https://code.wireshark.org/review/20359 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-03Qt: Add selection history navigation.Gerald Combs1-2/+79
Add the ability to move back and forth in the packet selection history similar to GTK+. Update the documentation accordingly. Change-Id: If1fdc1e59b240c0588c292dc0f7f0a5f083c30e1 Reviewed-on: https://code.wireshark.org/review/20320 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-12-13Qt: Optionally restore our selected packet when thawing.Gerald Combs1-3/+16
Stash the current row when we freeze the packet list. Make it possible to restore it when thawing. Do so when the layout changes and when we move a column. Change-Id: I44cfb8bafcd4d49a46e1c89bf47aecf5ac139773 Reviewed-on: https://code.wireshark.org/review/19222 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>