Commit Graph

148 Commits

Author SHA1 Message Date
Stig Bjørlykke 4980d505f2 Qt: Use correct column width when switching profile
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-26 17:16:51 +00:00
Stig Bjørlykke 9601a4f724 Qt: Save preferences when hide/show columns
To preserve the hide/show column settings between switching profiles
the settings have to be saved.

Change-Id: I6f72b2980be149676e1c1099a604c8c6d0d995bf
Reviewed-on: https://code.wireshark.org/review/12109
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-24 19:13:45 +00:00
Stig Bjørlykke 9851bed7a4 Qt: Fix column resolve names
Reset columns when resolve names column menu item is toggled,
and save preferences to preserve the setting.

We should probably have functions to redraw only one column.

Change-Id: I52dce8d104ab9bedd11edc5d200ab85154243cb5
Reviewed-on: https://code.wireshark.org/review/12077
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23 20:35:23 +00:00
Stig Bjørlykke 7324555c1f Qt: Fixed more column issues when changing profile.
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-23 17:02:41 +00:00
Pascal Quantin 17e088ba0e Qt: save columns position before freezing
It allows to restore them properly in thaw()

Bug: 11737
Change-Id: Ibee6ee701ab64019ee03666c652c232770b3bb74
Reviewed-on: https://code.wireshark.org/review/11999
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: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-22 17:29:06 +00:00
Gerald Combs 9f8d00c174 Add preferences for related packets and the scroll bar minimap.
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-27 23:28:56 +00:00
Gerald Combs a0113a5eb3 Qt: fix time shift
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-10-19 17:41:12 +00:00
João Valverde c00420efa2 Move utf8_entities.h to wsutil
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0
Reviewed-on: https://code.wireshark.org/review/10786
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-10-05 14:34:53 +00:00
Peter Wu 1d0532fee5 qt: warn when jumping to an invalid packet number
I was confused when double-clicking a packet number did not work. It
turns out that the display filter was hiding the destination.

Check the packet number for sanity, just like GTK+ does.

Change-Id: If50b2a3091a468f880b42fd2385f1b74c30d2f2b
Reviewed-on: https://code.wireshark.org/review/10700
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-09-30 12:40:06 +00:00
Gerald Combs 30ff173a87 Qt: Always make the packet list row heights uniform.
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-23 20:53:18 +00:00
Gerald Combs 50ff8ae0c7 Qt: Add idle dissection.
Features such as sorting and scroll bar colorization require
fully-dissected packets. We currently do dissection at the wrong time --
*after* the user clicks on a packet list column header or moves the
scrollbar.

Add a timer + slot that dissects packets when the UI is idle so that our
packets are at least partially dissected when we need them.

Change-Id: I024c590af2250d67404a520f118e46ec0c49cd71
Reviewed-on: https://code.wireshark.org/review/10593
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-21 15:40:29 +00:00
Pascal Quantin cdc1b1ef8e Qt: flush visible rows before trying to select one
Otherwise you end up with a 'End of capture exceeded' popup when calling rescan_packets() with only a few packets in the capture

Change-Id: Idb387ce95f1d22b934e735c350ea0c117763d89a
Reviewed-on: https://code.wireshark.org/review/10567
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-18 17:46:16 +00:00
Gerald Combs ae4d99b670 Packet list speedups.
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-17 19:37:48 +00:00
Gerald Combs 565a953f24 Don't invalidate the column cache when we filter packets.
Limit PacketListModel::recreateVisibleRows to checking for packets that
passed the display filter. Remove the call to resetColumns, which
invalidates the column string cache.

Call PacketListModel::resetColumns from PacketList::columnsChanged.
Along with invalidating the column string cache, this triggers a widget
update which means we shouldn't need to call recreateVisibleRows or
redrawVisiblePackets. Remove them.

Change-Id: Ic25f139e2c2f8cdebb2a868ccda7eb4127a3013c
Ping-Bug: 11324
Ping-Bug: 11514
Reviewed-on: https://code.wireshark.org/review/10491
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-13 18:52:19 +00:00
Stig Bjørlykke 47f5d41acd Qt: Fixed a resource leak in getFilterFromRowAndColumn
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>
2015-09-08 06:33:55 +00:00
Stig Bjørlykke 91d863cc16 Qt: Fix use-after-free pattern
This fixes crashes due to use of deallocated memory in:
- Export Packet Dissections
- Merge Capture Files
- Edit Packet Comment

Change-Id: I3dab8c0735eb5e642d6a4580d20bc3c81cf1345b
Reviewed-on: https://code.wireshark.org/review/10392
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-09-08 06:30:02 +00:00
Gerald Combs f19a173a84 Speed up column sorting.
The GTK+ UI sequentially dissects and caches column strings for all rows
before sorting a column. Do the same in the Qt UI, which can improve
performance considerably.

Don't colorize packets when sorting in the Qt UI unless it's necessary.

When sorting in the Qt UI, let the user cancel the initial packet
dissection.  Note that we'll need to replace std::sort in order to
cancel out of sorting.

Use a pre-allocated and pre-compiled GRexex when we prime columns. Note
that we probably shouldn't parse a regular expression there.

Cache the last result of proto_registrar_get_byname.

Note performance hot spots elsewhere in the code.

To do:

GeoIP in packet-ip.c is pretty slow.

Bug: 11467
Change-Id: Ib34038fee08ef0319261faeffc4eca01e52f4bd3
Reviewed-on: https://code.wireshark.org/review/10275
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-28 02:54:20 +00:00
Michal Labedzki 037524490d Qt/Minimap: Fix for Qt < 4.8
I hope it is quite right solution.

Change-Id: Ia9c883a832ddd03985eda37a9b344c4d7c8135e2
Reviewed-on: https://code.wireshark.org/review/10091
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 07:55:24 +00:00
Stig Bjørlykke 68c51724fe Qt: Always rebuild columns when fields changed
The columns must be recreated even if no capture file is loaded
because custom columns may have reference to deregistered fields.

Change-Id: I4ed7345b3200e5af211695f1a6511ee229d5f13c
Reviewed-on: https://code.wireshark.org/review/10076
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-17 19:45:44 +00:00
Gerald Combs 9fd3bcc25e Add an elide mode preference for the Qt packet list.
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db
Reviewed-on: https://code.wireshark.org/review/9902
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-06 21:06:34 +00:00
Evan Huus 7c46b25927 qt: fix scrollbar crash applying conv. filter
When applying a conversation filter via context menu on the packet list,
something triggers the scrollbar to redraw when it has a maximum value of 0,
leading to a div-by-0. Guard against that (for now) though there may be a better
long-term fix.

Change-Id: I5fa0cac3e67f50a6c603a6fa10b117de5540d444
Reviewed-on: https://code.wireshark.org/review/9850
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-02 18:57:48 +00:00
Gerald Combs 5336c9aabc More spacing fixups.
Make spacing more consistent.

Change-Id: I8980a84ca70660057016985299b0f95761076893
Reviewed-on: https://code.wireshark.org/review/9835
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-31 19:23:01 +00:00
Gerald Combs da07c62bd0 More context menu updates.
Add "Follow" and "Export Packet Bytes" to the packet detail context
menu. Remove duplicate SCTP menu. Remove redunant action text.

Change-Id: If69815dc774806e267fbd71aa390b0af6f3b0d14
Reviewed-on: https://code.wireshark.org/review/9829
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 21:12:42 +00:00
Gerald Combs 9603db48d1 Make copy menu item names more consistent.
Change-Id: Ia7b2a87ba9ad843dfa9200d69eeb94275a3dc0bb
Reviewed-on: https://code.wireshark.org/review/9827
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 19:36:26 +00:00
Gerald Combs 549b8f08e8 Add a missing menu item.
Add "Copy as Filter" to the packet list context menu. Remove completed
item comments.

Change-Id: I1e2d9ebcff2fb36918d3e7525690cfb105cb1b13
Reviewed-on: https://code.wireshark.org/review/9826
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 19:25:10 +00:00
Gerald Combs 16b048d34b Packet list and detail context menu updates.
Add some missing items to the packet list and detail "Copy" context
menus. Don't nest the "Copy" items so deeply. Add YAML to the supported
summary formats.

Note that "Copy as Binary" copies to the clipboard as
application/octet-stream, which is a) arguably correct, and b) not very
useful. Fixes welcome.

Enable and disable packet detail context menu items from a set of
booleans similar to the packet list.

Change-Id: Iaa931c766aa476c33f27de089e5c4dbaf9ce74d6
Ping-Bug: 9320
Bug: 10831
Reviewed-on: https://code.wireshark.org/review/9825
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 19:13:38 +00:00
Gerald Combs d6f59cd10f Main menu and packet list menu updates.
Enable and disable packet list-relasted menu items in one place. Add
"Colorize Conversation" items to the packet list context menu.

In the GTK+ UI we tend to disable entire menus, which makes their items
inaccessible. Try not to do that in the Qt UI so that menu items are
always visible even if they're disabled.

Remove commented items which are now complete.

Change-Id: I69b878b45334bf88014694b1bf016278fa55a94b
Reviewed-on: https://code.wireshark.org/review/9819
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-29 22:38:43 +00:00
Gerald Combs 01bc31cded Fixup packet list context menu behavior.
Add logic to setMenusForSelectedPacket for setting the enabled states
for the "Apply As" and "Prepare A" actions. Update the PacketList
context menu code to fill in the right filter at the right time.

Exit out of setMenusForSelectedTreeRow if the packet list has focus so
that we don't clobber the enabled states of various actions.

Take the "Apply As" and "Prepare A" context menu titles from their main
window counterparts. Remove actionApply_as_Filter and
actionPrepare_a_Filter.

Remove completed to-do items.

Change-Id: I8f6f538bb7786d8df02a999f3b449dfde640e847
Reviewed-on: https://code.wireshark.org/review/9810
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-27 23:26:04 +00:00
Gerald Combs da5eba636a Fix QCocoaMenu errors.
In PacketList and ProtoTree, create our own QMenus instead of stealing
actions from the main window. This only fixes the errors listed in bug
10890. Add "to do" items for other bugs.

Bug: 10890
Change-Id: I1c7ce8e4b863de95b2836e0cdcfb25824fe21edd
Reviewed-on: https://code.wireshark.org/review/9760
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-23 20:37:50 +00:00
Gerald Combs a5f7b84dba Fixup selected packet arithmetic.
Or, "I can mathing" if you prefer meme-based commit messages.

Change-Id: I8fd1db0e2a1e99525191ae6b33115ef8e38ab2f4
Reviewed-on: https://code.wireshark.org/review/9758
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23 18:23:35 +00:00
Gerald Combs 1514fe06cd Show the current selection in the overlay scrollbar.
Change-Id: Ie92b7ae170938eac71ede751d9067e1d47293092
Reviewed-on: https://code.wireshark.org/review/9750
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23 00:24:08 +00:00
Gerald Combs e30a0ff765 Add manual name address resolution.
Make it an editor frame instead of a dialog similar to the column editor
and prototocol preference editor.

Change-Id: If1a0cdf02dcab0eca98e8d39c94a3c2fe236df5a
Reviewed-on: https://code.wireshark.org/review/9743
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-21 22:43:05 +00:00
Michal Labedzki 1e487664bc Qt: Add option to back white line separator for packet list items
This uses one line (on bottom) of items and makes it white.
Seen in Wireshark on some configurations of GTK 2 on Linux,
so backports it to Qt for people who like it.

In my opinion it helps if you use packet list background colors
for frames and you have a lot of following frames with
the same background color.

Bug: 10954
Change-Id: Id8f58520d7224db4eb8181bcc04febd7416a8578
Reviewed-on: https://code.wireshark.org/review/7293
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-07-20 21:21:28 +00:00
Gerald Combs 255d53dfc1 Draw packet colors in the packet list scrollbar.
Inspired by (but not as fancy as) Packet Fence, an enhancement written
for Ethereal a loooong time ago by Martin Visser:

https://www.wireshark.org/lists/ethereal-dev/200011/msg00122.html

Several text editors call this a "minimap".

Color each scrollbar raster line to match the color of up to 7 packets.
Note in the comments why this number was chosen.

If we have any flagged frames (marked, ignored, time ref) indicate them
on either side of the scrolbar.

Handle HiDPI (retina) displays. This means that your window size depends
on the height of your scrollbar *and* your monitor resolution.

Qt's idea of the slider rect doesn't match up with the slider on OS X.
This might be local to my build -- I can replicate it Qt Creator.

Change-Id: Ia089d2d766ce37bab11e22d1a5721b4908935304
Reviewed-on: https://code.wireshark.org/review/8982
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 22:57:31 +00:00
Gerald Combs 41ed7127a5 Qt: Frame flag updates.
Move frame flag (mark, ignore, ref_time) member functions from
PacketList to PacketListModel. They arguably belong there and we can
emit dataChanged to signal updates.

Rename some variables named "index" since they shadow a function name.

Change-Id: I9a731a76e4e63e562b561c29d13915278d5a7dbb
Reviewed-on: https://code.wireshark.org/review/9663
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 19:13:14 +00:00
Gerald Combs d2acb04b4c Add the RTP Stream Analysis dialog.
Combine the GTK+ RTP Stream Analysis and RTP Graph Analysis dialogs into
one. Yell at the user less. Disable the Analyze RTP Stream menu item if
we don't have an RTP stream selected.

There are a *lot* of moving parts in this dialog. I've tested with the
few RTP captures I have but it's by no means complete.

"To do" items are listed at the top of rtp_analysis.cpp.

Change-Id: Id503977f069bebc46cc68bc749f0c9cbf4d37bf6
Reviewed-on: https://code.wireshark.org/review/9650
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-16 00:30:14 +00:00
Gerald Combs 0744e677d3 Check for a valid pointer when ignoring a frame.
Change-Id: I1a4a6b3f729c818a68bee1b6b8de3778130252a4
Reviewed-on: https://code.wireshark.org/review/9652
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-15 23:05:41 +00:00
Gerald Combs c305f08921 PacketList column fixes.
Add a columnsChanged slot to PacketList and move the column update code
from redrawVisiblePackets there. Make sure we call
packet_list_model_->recreateVisibleRows, which should fix the behavior
described in bug 11324. Call columnsChanged when we, uh, change columns.

Add a sectionMoved slot to handle column reordering.

Don't rebuild the column list when we update the widgets in the column
preferences frame.  Do enable and disable the "remove" button as needed.

Try to keep the user from removing all of the columns in both the packet
list and column preferences.

Left as an exercise for the reader: The GTK+ UI also fails when you
remove all of the columns via the preferences:

  packet_list.c:377:packet_list_sort_column: assertion failed: (col)

Bug: 11324
Change-Id: Id58cf98e42cbda9aa2fc370ea06b8bcc6098c8ca
Reviewed-on: https://code.wireshark.org/review/9591
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-13 02:36:41 +00:00
Gerald Combs 39a2d9468b Fixup packet list selection.
Be less aggressive about resetting the packet list model so that we
retain our selection when (un)coloring packets or rebuilding columns.

Correctly enable a colorization menu item while we're here.

Change-Id: I8d1c8f26dbb8a814b8344b609695b77632006e4b
Reviewed-on: https://code.wireshark.org/review/9608
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-12 19:59:58 +00:00
Joerg Mayer 21754f43e1 Starting to get rid of Q_UNUSED declarations for unused function parameters.
The official C++ way is to leave out the variable name instead. This has the
advantage to be reliable: In one case a variable declared unused was later
used.

Change-Id: I1c96636f7fa7a621d1594d1e9cacaec75c561faa
Reviewed-on: https://code.wireshark.org/review/9532
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-07 06:29:31 +00:00
Gerald Combs 0b0100befa Fixup the packet list navigation action behavior.
Change-Id: I124fe3c3755556e81c65443b8b9744a89394dc70
Reviewed-on: https://code.wireshark.org/review/9218
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-29 17:22:34 +00:00
Michael Mann da09a1bfd8 Take all epan_column_info members that always get allocated to "number of columns" to share their own data structure.
Change-Id: Ib982662db6cf68730a7d121eac60d9bc5ae67429
Reviewed-on: https://code.wireshark.org/review/9195
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-29 02:11:04 +00:00
Gerald Combs d7b286c794 Qt: Be less aggressive about reselecting packets.
Don't reselect the current row in redrawVisiblePackets. That routine is
called in quite a few places, including ones where we don't want to
automatically scroll to the current packet.

Change-Id: Ia29a832235c0e260d8b17f1ce76745047700537b
Reviewed-on: https://code.wireshark.org/review/9064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 18:23:12 +00:00
Gerald Combs 9c28594529 Add a preferences editor frame.
This replaces the single preference editor dialog in the GTK+ UI.

Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5
Reviewed-on: https://code.wireshark.org/review/8966
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-06-18 00:46:50 +00:00
Gerald Combs 26dacfc8c3 Qt: Add protocol preferences menus.
Add protocol preferences in the packet list and packet detail context
menus. Note that we need a PreferencesEditorFrame in the main window for
editing numeric and string preferences. For now we just show the prefs
dialog.

Change-Id: Ice0cc8e9bc25963cc14aa47698f042f2a73088d8
Reviewed-on: https://code.wireshark.org/review/8957
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-06-17 01:25:27 +00:00
Alexis La Goutte 3827c81473 Qt: Add Conversation Filter sub menu
Apply conversation filters using the new color_dissector_filters.[ch]
from g1f03180.

Change-Id: I2e535bb3d5b95fd26226422daf9f83c452a95e3c
Reviewed-on: https://code.wireshark.org/review/3558
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-29 21:25:09 +00:00
Gerald Combs 76a5465cf0 Qt: Fix packet deselection.
When no packets are selected, clear the related item delegate, packet
detail, and byte view. Also, don't crash.

Bug: 10529
Change-Id: I1f46d0d60d060d517f1ee2f8b5a9124bc1fad00e
Reviewed-on: https://code.wireshark.org/review/8470
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 16:07:29 +00:00
Gerald Combs 294706a1bf Fix packet list font zooming.
Change-Id: I376fc3b41e9ebbe1353527d8d3bbf8d4b86cc29a
Reviewed-on: https://code.wireshark.org/review/8463
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 18:04:09 +00:00
Gerald Combs 2156413bf9 Qt: Column preference fixes.
Don't call redrawVisiblePackets in PacketList::sectionResized. Otherwise
we trigger the crash in bug 11179. Call recent_set_column_width instead.

Clean up the slots called when column preferences change and when recent
column widths change.

Update our column visibility in redrawVisiblePackets.

Use recent_get_column_width when writing the recent file. columnWidth
doesn't return a valid value when we're not visible.

Bug: 11179.
Change-Id: I34ab93d944b341e42129a1c8ff94ba8f7ad4f5fc
Reviewed-on: https://code.wireshark.org/review/8457
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 15:37:35 +00:00
Gerald Combs 4a37dfc57e Qt: Add the correct column width padding.
When applying recent column widths, add the correct padding in the
right place.

Bug: 11175
Change-Id: I5a6fe7975764ddc5d9024d8839a837579b2bf799
Ping-Bug: 11179
Reviewed-on: https://code.wireshark.org/review/8456
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-05-13 20:41:51 +00:00