aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list.h
AgeCommit message (Collapse)AuthorFilesLines
2021-09-10Allow adding comments to all selected packetsDavid Perry1-0/+1
Allow the user to select multiple packets, and * add the same comment to all selected packets * remove all comments from selected packets A new comment is added to each packet, now that we support multiple comments per packet. This is one potential way to address #8713.
2021-07-07Use wtap_blocks for packet commentsDavid Perry1-2/+3
Mostly functioning proof of concept for #14329. This work is intended to allow Wireshark to support multiple packet comments per packet. Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`. It attaches a `wtap_block` structure to `wtap_rec` in place of its current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT and OPT_PKT_VERDICT option values.
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.
2020-10-28Qt: Fix saving+restoring frozen packet list rows.Gerald Combs1-1/+1
Use the packet list selection model to save and restore selected rows when freezing and thawing. Fixes #16770.
2020-07-03Qt: List all protocols in PacketList "Protocol Preferences"Stig Bjørlykke1-1/+1
Show all protocols which has preferences in the packet list context menu "Protocol Preferences". Change-Id: I72e2ed95db36cc6d817ca44db214782f075d55d6 Reviewed-on: https://code.wireshark.org/review/37666 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-11-21Qt: Remove frameSelect signalRoland Knall1-1/+0
As all frameSelect signals now transport a QList<int> of selected frames, use this instead Change-Id: I1888e45a4df997920aebde9706ca0ae803bdba03 Reviewed-on: https://code.wireshark.org/review/35176 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-20Qt: Include Column Headings with Edit -> Copy -> Plain Text / CSVMike781-0/+2
Bug: 16215 Change-Id: Ie59aa354be055831055a294724f8d7b800d35d90 Reviewed-on: https://code.wireshark.org/review/35153 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-19Note that Qt imposes a maximum frame number of 2^31-1.Guy Harris1-0/+7
Nothing in libwireshark limits frame numbers to 2^31-1 - they're stored as unsigned ints and thus can go up to 2^32-1. That doesn't fit with the way QTreeView works, as the model is ultimately from a subclass of QAbstractItemModel, and that uses ints, not unsigned ints, for row numbers. Change-Id: I174c3ccdb5e86ea5897643560936c301fcc78c54 Reviewed-on: https://code.wireshark.org/review/35141 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-17Qt: Multiselection in PacketListRoland Knall1-0/+16
This implements multi-selection for the PacketList. It allows multiple lines to be selected, and either drag/drop them to a text editor or use Ctrl/Cmd+C to copy the content to a clipboard. Opening the context menu disables the selection, and it does not change the underlying currently selection. This is done on purpose, as multi-selection is a copy-task only functionality at this point Export & Print work as expected, exporting just the selected items. Same goes for the copy menu, which has the additional entries for copying the list elements Bug: 14612 Change-Id: I77960aa1ab1d172a21abfa469baac0cd57f9f9d9 Reviewed-on: https://code.wireshark.org/review/35073 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-09-04Qt: Fix override declarations for PacketListRoland Knall1-11/+12
Fix missing override declarations for packetlist header information Change-Id: If9d1cbcae20b5d098ff7b74cd263a6a21a296598 Reviewed-on: https://code.wireshark.org/review/34446 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-09-02Qt: PacketList call DecodeAsDialog directlyRoland Knall1-1/+1
Calling the directly from the context menu and setting data just before the execute of the menu can lead to information not present. Furthermore for future changes, the move to have QMenu only as a local variable is being reverted Change-Id: I470da26e658ae81ca416b3864889a4317b865755 Reviewed-on: https://code.wireshark.org/review/34428 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-26Qt: Remove unnecessary code for context menusRoland Knall1-1/+0
This code is no longer required, as context menus should be bound to local events. As for "Reloading LUA plugins" - the keyboard shortcut would be able to trigger while the menu is open, except Qt explicitely prevents that Change-Id: Id18a3a17d62bae1ff547a6ef96772e12a2535219 Reviewed-on: https://code.wireshark.org/review/34371 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-04Qt: Properly hide the choosen model from external viewsRoland Knall1-1/+0
This moves the append function to the model, where it makes more sense. Change-Id: Iea9ccaf0672e8ad05454b4c35c303ca7dc2e6373 Reviewed-on: https://code.wireshark.org/review/33843 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-04Qt: Workaround for Qt model() bugRoland Knall1-1/+1
model() on the TreeView should return a value, but instead returns a null pointer. Moving the methods to the model would be the next step, but until then, this workaround regains functionality Change-Id: Iaa0b6470af41b297a821c0dd6e3a238481752886 Reviewed-on: https://code.wireshark.org/review/33839 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-04Qt: Do not export the model of the packetlistRoland Knall1-1/+3
Exporting the model for the packetlist via a function prohibits implementing further models (sorting) inside the packetlist Change-Id: Ica159fc8f242ae1a5b657507a26e33827c366bee Reviewed-on: https://code.wireshark.org/review/33834 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-29Qt: Prevent hidden global parametersRoland Knall1-1/+1
Remove the hidden global parameter settings Change-Id: I186dfb22d972abf8de2e37ccd0a4d76340b188dc Reviewed-on: https://code.wireshark.org/review/33762 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-26tap: add credentials tap.Dario Lombardo1-2/+1
This new tap collects credentials (username and paassword) from the dissectors. So far, few dissectors have been instrumented: - http (basic auth) - http (header auth) - ftp Others can be instrumented as well using the same technique. Tshark has a new option (-z credentials) and Wireshark a new "tools" menu: the documentation has been updated accordingly. Change-Id: I2d0d96598c85bb3ea4fb5ec090dd8dc28b481fc9 Reviewed-on: https://code.wireshark.org/review/33453 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-06-16Qt: Fix ghost drag-and-drop in PacketList on empty fieldsRoland Knall1-0/+3
If you start dragging on an empty field, you pick up the value of a field you drag over. This is fixed Change-Id: I7e1c5e353dbc79ee1193b305729fb44d62d98470 Reviewed-on: https://code.wireshark.org/review/33629 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-16Qt: Fix drag-and-drop from packet listRoland Knall1-0/+1
Only initiate drag-and-drop when the left mousebutton has been clicked, and also add the filter as plain text, so to enable dragging to external applications. Change-Id: I2f6ac7f9c543d003070c2a6c0ce671ed5a215669 Reviewed-on: https://code.wireshark.org/review/33620 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-14Qt: Fix Contextmenu for PacketlistRoland Knall1-0/+2
The context menu got removed, adding it back Change-Id: Ia44a6ed576a88be5a07d76c184740a2fd9bfa844 Reviewed-on: https://code.wireshark.org/review/33602 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-13Qt: Move Packetlist Header Context Menu to subclassRoland Knall1-21/+3
This is a cleanup patch to remove unused or unnecessary code from packet list and put it in its respective header class for better code maintenance Change-Id: Ib7d7f34ab9cdd802199b3f279499855c80f8f0c5 Reviewed-on: https://code.wireshark.org/review/33587 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-25Qt: Configure the selection color via the preferencesPaul Zander1-0/+1
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-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-1/+1
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-04Convert preference dialog to use more models.Michael Mann1-15/+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-1/+0
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-11-23Qt: Add menu option to remove all packet commentsMichael Mann1-0/+1
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-12Qt: Rename packetSelection to frameSelectedRoland Knall1-2/+1
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-2/+5
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-07-26Qt: Create models directoryRoland Knall1-2/+2
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-1/+1
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-06-20Qt: Turn off auto scroll when going to a packetStig Bjørlykke1-0/+1
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-0/+1
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-03-03Qt: Add selection history navigation.Gerald Combs1-0/+7
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-1/+14
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>
2016-09-22Qt: Optimized setColumnVisibility() usageStig Bjørlykke1-1/+0
Setting column visibility (show/hide columns) is only needed when columns has changed and when show/hide from column popup menu. Change-Id: Ia33d6fccab44443c453921fc2629bbf1d22efd01 Reviewed-on: https://code.wireshark.org/review/17781 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-04-28Qt: Refactor the packet list scroll bar.Gerald Combs1-1/+2
Split OverlayScrollBar into parent and child scroll bar widgets. This gives us two packet list scroll bars: a packet map, which draws and operates on nearby packets and a normal scroll bar. The packet map is drawn to the left of the child scroll bar. This gives us more room to draw and doesn't obscure the scroll bar itself (which is a problem on newer versions of Windows). When the user clicks on a portion of the map, scroll to that part of the packet list. Draw marked packet ticks over the normal scroll bar. Marked & ignored are on the left, time references are on the right. To do: - Borrow more from packet fence and graph something (packet size? time delta?) Change-Id: Ie952fcbd98fd0e047200f2279cb63227feabf5b1 Reviewed-on: https://code.wireshark.org/review/15046 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-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-12-13Qt: Removed applyRecentColumnWidths from recentFilesReadStig Bjørlykke1-1/+2
Adjusting column widths from recent settings is only needed when columns has changed. Don't recreate the columns when changing timestamp options or name resolution, only reset columns. Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3 Reviewed-on: https://code.wireshark.org/review/12579 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-28Qt: fix "go to packet" broken by g56625ddPascal Quantin1-0/+1
Keeping auto scroll is required to update the row displayed. Instead catch the mouse event and stop auto scroll only during that time. Change-Id: Ibc5b0a4115192fc3e01e63c82e67761e5aed9d3b Reviewed-on: https://code.wireshark.org/review/12235 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Qt: remove automatic horizontal scrolling when selecting a rowPascal Quantin1-1/+1
QTreeView automatically scrolls so as to show as much as possible the content of the selected column. Let's get rid of that. Rename PacketList::setAutoScroll() so that it does not overload QAbstractItemView::setAutoscroll() Change-Id: I09fb54f9b31c3025efddce6a4e709baaf107702d Reviewed-on: https://code.wireshark.org/review/12225 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Qt: Check zero recent column widthStig Bjørlykke1-0/+1
Hidden columns may have been stored with zero width, so ensure we always check for this when fetching. Change-Id: I625c05adccaf2d81198fdeeccf7feeb9a9eb82c2 Reviewed-on: https://code.wireshark.org/review/12196 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-11-26Qt: Use correct column width when switching profileStig Bjørlykke1-0/+1
QTreeView::setColumnHidden() saves column width on hide and restores column width on show. When switching from a profile with hidden columns to a profile where this columns are shown we get a sectionResized() signal with the saved width from the old profile, initiated from columnsChanged() -> setColumnVisibility(). We must avoid setting this as a new column width because this is recent values from a old column layout. In other cases we use setColumnVisibility() we don’t need to set a new column width either, because we store the column width ourself. Don't store column width when hiding column (new_width == 0). Restore column width when showing column because profiles may have changed the packet_list layout. Change-Id: I7e89c3477402ec6d621cd2015ee74b086f60d6cb Reviewed-on: https://code.wireshark.org/review/12111 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23Qt: Fixed more column issues when changing profile.Stig Bjørlykke1-0/+1
When changing profile without a loaded capture file we have to rebuild cap_file_->cinfo when a capture is loaded. Bug: 11493 Change-Id: I9b561a360236056c104cfdb478b855fa550325e2 Reviewed-on: https://code.wireshark.org/review/12068 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-13Qt: Coloring Rules dialog fixups.Gerald Combs1-1/+1
Insert new rules at the top. This matches the GTK+ UI behavior. Recolor the packet list when we press "OK". Add a "to do" item about setting the filter column width. Change-Id: I2a9e58fe8642a89f12e1c34622b96613f3ec4c05 Reviewed-on: https://code.wireshark.org/review/11781 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-10-27Add preferences for related packets and the scroll bar minimap.Gerald Combs1-1/+1
Add gui.packet_list_show_related and gui.packet_list_show_minimap. Show_related enables and disables the related packet delegate. Show_minimap enables and disables the minimap. Start calling it the "intelligent scroll bar" since that's the best suggestion for a name I've seen so far. Leave them out of the Appearance preference pane for now. Change-Id: I5869c446fda5c8e62d6b1e49a74d63ba3b117b0f Reviewed-on: https://code.wireshark.org/review/11332 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-10-19Qt: fix time shiftGerald Combs1-0/+2
Add a timeShifted signal to TimeShiftDialog and use it to update the packet list and model. Add drawCurrentPacket to PacketList so that we can do a more thorough job of redrawing the current packet and tree. Bug: 11575 Change-Id: I960d8cdbf6872e3f71007cb4d2bbd5457f268257 Reviewed-on: https://code.wireshark.org/review/11068 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-23Qt: Always make the packet list row heights uniform.Gerald Combs1-1/+1
In tests here using GTK+ 2.24 and 3.10, GtkTreeView handles multi-line items by adjusting the height for all rows, but only after the number of multi-line items exceeds some sort of threshold. For a packet capture which contains a few DNS packets and a lot of TCP packets, if I change "Standard query" to "Standard\nquery" in packet-dns.c I get single-height packet list items. If I change "[TCP segment of a reassembled PDU]" to "[TCP segment of a\nreassembled PDU]" in packet-tcp.c (which results in more multi-line column strings) I get double-height packet list items. The current Qt code initially sets the uniformRowHeights property then falls back to variable row heights if we run across a multi-line column string. This adds a lot of logic which can impact other functionality (e.g. column widths) and recalculating row heights is painfully slow for large numbers of packets. Instead of trying to manage variable row heights, always enable uniformRowHeights. Track the maximum newline count and trigger a row height adjustment when it changes. This mimics the GTK+ UI behavior, although it should be more reliable. Note that we need to adjust some numbers in RelatedPacketDelegate. Change-Id: I289e963b6f00338c4374e602fa3fc83d04554519 Ping-Bug: 11515 Ping-Bug: 10924 Reviewed-on: https://code.wireshark.org/review/10628 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-17Packet list speedups.Gerald Combs1-0/+2
beginInsertRows + endInsertRows is expensive. Instead of calling them each time we add a packet to the list, queue up a list of visible packets and flush it during the next UI update. Assume that none of our column data has newlines. Enable uniformRowHeights and only disable it when we need to. Note that this requires further work. Ping-Bug: 11515 Ping-Bug: 10924 Change-Id: Ifbdd2964b174247a4745d4889ebda5bf3b886ba4 Reviewed-on: https://code.wireshark.org/review/10553 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-09-08Qt: Fixed a resource leak in getFilterFromRowAndColumnStig Bjørlykke1-1/+1
Found by coverity CID 1314608 and Apple Instruments. Change-Id: I264ce335bd8985946a097bb8f99f7c41c0eb027d Reviewed-on: https://code.wireshark.org/review/10378 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>