Commit Graph

1981 Commits

Author SHA1 Message Date
Guy Harris 4d22c44f65 Have the interface list unsorted by default.
That way, they initially show up in pcap's order, putting the preferred
interface at the top.  If the user wants to sort them by some column,
the user can click on the column in question.

Change-Id: I30ac38519c42ae5317d99fdd0a079b030e6af308
Reviewed-on: https://code.wireshark.org/review/14194
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-27 02:52:00 +00:00
Guy Harris 4c3a6a8ef4 Empty out InterfaceTree::updateGlobalDeviceSelections() if no pcap.
It doesn't even need to bother checking the argument.

Change-Id: I2cdc9d7da24392ff3fae84e31442530c2e854734
Reviewed-on: https://code.wireshark.org/review/14174
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-26 19:35:52 +00:00
Gerald Combs 4a38f429b6 Mark a variable unused when we're not using it.
Change-Id: I020447859114551e71810bf17ba05dc353a1ff08
Reviewed-on: https://code.wireshark.org/review/14171
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-26 18:54:39 +00:00
kkoizumi 0b3544083e tcp_stream_dialog: Integer overflow in Average Throughput
Overflow occurs in the TCP Stream Graphs window when Average Throughput exceeds 20-30 Gbps.

* Screenshot examples
https://raw.githubusercontent.com/koizumi-k/pub/master/misc/stream1-current-win64.png
https://raw.githubusercontent.com/koizumi-k/pub/master/misc/stream2-current-win64.png

Change-Id: I4e557fdeae659ef27b986fca18c74cc8983fe4d3
Reviewed-on: https://code.wireshark.org/review/14163
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-02-26 18:37:15 +00:00
Gerald Combs 070fc33e85 Qt: Update selected interface filter behavior.
Change the selected interface behavior in the main window and the
capture interfaces dialog to better handle multiple selections. Attempt
to document this at the top of interface_tree.cpp.

Move the default capture filter code from CaptureFilterEdit to
MainWelcome. Add a "conflicting filter" check to CaptureEdit which
updates the placeholder text.

Handle conflicting filters in the main welcome screen and the capture
interfaces dialog. Propagate interface selections and filter updates in
the capture interfaces dialog to the main welcome screen.

Consolidate some of the interface handling code in InterfaceTree and
CaptureInterfacesDialog.

Make sure CaptureInterfacesDialog manages the global capture options by
device name instead numeric index.

Start deprecating prefs.capture_devices_filter and
capture_dev_user_cfilter_find.

Change some member function names so that they're hopefully more clear
and consistent.

Ping-Bug: 11886
Change-Id: I63b06dbae29c2c45ee9252092ad54bdcbacae6e6
Reviewed-on: https://code.wireshark.org/review/14129
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-26 17:28:04 +00:00
Gerald Combs 7a9bd51e95 Qt: Capture Interfaces dialog geometry updates.
Widen CaptureInterfacesDialog. Manually set some column widths.

Change-Id: I84fd060d83b5f7bc186d79e22d5cc608dfdbd6c5
Reviewed-on: https://code.wireshark.org/review/14148
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-02-26 00:26:33 +00:00
Guy Harris e9b2859c45 Clean up modelines and indentation.
HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT
character as tabbing to 4-space tab stops, or that even are configurable
but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are
broken.  tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever
expect anybody to look at your file with a UN*X tool, and every text
file will probably be looked at by a UN*X tool at some point, so Don't
Do That.

Adjust indentation to reflect the mode lines.

Change-Id: Icf0831717de10fc615971fa1cf75af2f1ea2d03d
Reviewed-on: https://code.wireshark.org/review/14150
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-25 21:34:36 +00:00
Gerald Combs 3955dae2d8 Qt: Emit textEdited from CaptureFilterEdit in more places.
We should emit textEdited whenever the user changes the text
interactively. Do so when the user clicks the clear button or selects a
recent filter.

We might want to copy this to DisplayFilterEdit.

Change-Id: Icf02fead52947fcef6e7e617b0c49bfc9e1aec65
Reviewed-on: https://code.wireshark.org/review/14144
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-02-25 20:02:11 +00:00
Stig Bjørlykke 0ffa73ae24 Qt: Use UTF8_HORIZONTAL_ELLIPSIS for …
Bug: 12172
Change-Id: Icbb3011ff18fc53c3e77c62692ed977178d1aace
Reviewed-on: https://code.wireshark.org/review/14138
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-02-25 13:01:46 +00:00
Peter Wu 08c3bbbbb6 qt: show marker when capture file comment has changed
Fixes a missing "*" marker in the title and this warning when the
capture file comment is modified:

    QWidget::setWindowModified: The window title does not contain a '[*]' placeholder

Change-Id: Iea0a63cf8c8f9abd577397c8881f0399d2e798ba
Reviewed-on: https://code.wireshark.org/review/14010
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-24 10:04:58 +00:00
Guy Harris ec691a9e20 De-canonicalize paths for file and directory path preferences.
Undo Qt's "helpful" canonicalization of paths returned by the file
dialogs to use / as the pathname component separator rather than using
the native pathname component separator.

Bug: 12117
Change-Id: I6077191a2204574ca50f53b5424f7f421db33db3
Reviewed-on: https://code.wireshark.org/review/14109
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-24 05:09:42 +00:00
Gerald Combs fa809400bb Qt: Add tooltips to the welcome screen interfaces.
Show the interface address and saved capture filter.

Change-Id: I8403f97ea584783abdbe2d89b8c9061a00ececdf
Reviewed-on: https://code.wireshark.org/review/14100
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-02-23 19:38:19 +00:00
Stig Bjørlykke b5ac91399c Qt: Select matching tree item and bytes in Find Packet
Highlight the matching tree item and matching packet bytes when
doing a Find Packet.  Added cf->search_len to correctly highlight
the matching bytes when doing a regex search.

Bug: 12157
Change-Id: I84fbdb9b43be4355e24aff3cf5f8850f1119e2bf
Reviewed-on: https://code.wireshark.org/review/14086
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-02-23 18:30:48 +00:00
Stig Bjørlykke 0ef196a643 Qt: Optimize Show Packet Bytes
Change-Id: Ia81f501d5495125d3633af729051e185609353e0
Reviewed-on: https://code.wireshark.org/review/14087
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-02-23 18:30:32 +00:00
Pascal Quantin 03f9912772 Qt: add OS interface description to 'Manage Local Interfaces' window
In case the user did not provide a custom name for the interface, display the
OS description in the 'Comment' column as how it is done in GTK UI.

Bug: 12156
Change-Id: If9da58980169df3eaf25f74e7b81676cbc4f6ebd
Reviewed-on: https://code.wireshark.org/review/14095
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-23 18:01:42 +00:00
Gerald Combs fd75aa2f3d Qt: Capture and display filter fixups.
In SyntaxLineEdit make sure we emit textEdited when we complete a
previously used filter. In CaptureInterfacesDialog, connect
captureFilterComboBox::activated to filterEdited. These enusre that we
fill in the capture filter column in CaptureInterfacesDialog.

Change-Id: Ibbf7ab223e37f8f73d8ec0289f8c32692a7e17d4
Reviewed-on: https://code.wireshark.org/review/14081
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-02-23 16:44:14 +00:00
Michael Mann 14881e72d6 tshark: load decode_as_entries file
With Wireshark 2.0, some dissector preferences were removed in favor of 'Decode As' functionality.
But the settings saved in the GUI are not loaded in tshark, preventing their use without an explicit call to '-d' option.
Let's load decode_as_entries file by default and have it overridden by the '-d' option if required.

Ping-Bug: 12124
Change-Id: I134a424cb6cf8fc89b7096a659ef1605314a70a2
Reviewed-on: https://code.wireshark.org/review/13956
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-21 18:25:01 +00:00
Gerald Combs 6e1d7b935b [Automatic update for 2016-02-21]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I80f7d5b45ef26dc4fb1ca34d549acfb2c0a54bcf
Reviewed-on: https://code.wireshark.org/review/14054
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-21 16:10:48 +00:00
João Valverde f0fb79d534 autotools: Use pkg-config autoconf macros for GLib/GTK
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset
of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add
dependency flags explicitly instead of using WS_CPPFLAGS.

Some minor improvements and fixes for missing/unnecessary variables (no impact
on our test builds).

Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671
Reviewed-on: https://code.wireshark.org/review/14005
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 07:51:55 +00:00
João Valverde 1b3ae81e9e autotools: Use Qt flags only for building Qt GUI
Change-Id: I041e2fab6de948c803cc059e78358077000efee8
Reviewed-on: https://code.wireshark.org/review/14006
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-20 14:27:00 +00:00
Pascal Quantin a795a3033a Qt: only "Comment" column should be editable in Local Interfaces management tab
Bug: 12146
Change-Id: Ife481b7c0b201a54749e212416571aa3dcaf7542
Reviewed-on: https://code.wireshark.org/review/14017
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>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-20 14:26:46 +00:00
Stig Bjørlykke 6e1bf33854 Qt: Set maximumSize on AccordionFrame widget buttons
After switching to QPushButton for buttons in SearchFrame and GoToFrame
the widgets needs a maximum size to reduce the height of the frame.

Change-Id: I504e65add446c4262e9b1e02ff3e41c08d1cfdfd
Reviewed-on: https://code.wireshark.org/review/14019
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-02-20 09:27:03 +00:00
Stig Bjørlykke 472687b5e1 Qt: Fix Open protocol preferences button.
Do showProtocolPreferences before removing the variable which
this depends on.  The button does not work without at module.

Change-Id: I7d31aa5ab19340a4102523b13de961e799cae5e4
Reviewed-on: https://code.wireshark.org/review/14015
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-19 18:32:26 +00:00
Stig Bjørlykke 61f73a3262 Qt: Update AccordionFrame widgets to use common layout
- Use QPushButton for buttons and set the "Find" button as default
  in SearchFrame.
- Use QPushButton for buttons, added a "Packet:" label, and set
  the "Go to packet" button as default in GoToFrame.
- Set Qt::WA_MacSmallSize in OS X for FilterExpressionFrame and
  PreferenceEditorFrame.
- Removed QFrame::StyledPanel and QFrame::Raised from ColumnEditorFrame.
- Update ui files to reflect that AccordionFrame is used for
  AddressEditorFrame, FilterExpressionFrame and PreferenceEditorFrame.

Change-Id: Icfbfff973535317997109a1020dfe24ba932e098
Reviewed-on: https://code.wireshark.org/review/13995
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-02-19 12:16:16 +00:00
Guy Harris b32a5ee98c Don't add the wiretap directory to the list of include directories.
If you include something from the wiretap directory, always precede it
with wiretap/.

Fix some includes of files in the top-level directory to use a path
relative to the current directory, not relative to the wiretap
directory.

This makes it a bit clearer what's being included.

Change-Id: Ib99655a13c6006cf6c3112e9d4db6f47df9aff54
Reviewed-on: https://code.wireshark.org/review/13990
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-18 12:55:26 +00:00
Stig Bjørlykke 30d83e089c Qt: Add regex support in Find Packet
Add support for using regular expressions in the Search Frame
when searching in packet list, packet details and packet bytes.

This search is in many cases faster than plain string search.

Change-Id: I2d8a709046f90d7b278fb39547fc4e2e420623bc
Reviewed-on: https://code.wireshark.org/review/13981
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-02-18 08:06:46 +00:00
Stig Bjørlykke 2d133d62ab Qt: Validate FindLineEdit regexp
Check if regexp is valid and set valid/invalid background color.

Change-Id: Ibf4d3fa84463afbd7c68631cfaddec8261807b8f
Reviewed-on: https://code.wireshark.org/review/13962
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-02-17 08:41:46 +00:00
Guy Harris 707298c680 Cast away a warning.
The argument to the resize method for QByteArray is an int, not a
size_t.

Change-Id: Id30bc03daec6d6ead8669794b5cb0247718be66b
Reviewed-on: https://code.wireshark.org/review/13977
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-16 22:26:29 +00:00
Stig Bjørlykke 989739c4fc Qt: Add Decode as in Show Packet Bytes
Add an option to decode the packet bytes from base64 or zlib compressed.
Also add configurable start byte and end byte to make it possible to
decode a subset of bytes.  It's also possible to select a range in ASCII
view and select "Show selected" from the context menu to make a subset.

In ASCII view a null terminator is replaced by UTF8 symbol for NULL,
and a CR is replaced by UTF8 symbol for carriage return.  This is done
to make it possible to "Show selected" from the context menu.

Change-Id: Ie03c9912c304c121af6ca9e998a6e8445b5382c5
Reviewed-on: https://code.wireshark.org/review/13958
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-16 21:43:14 +00:00
João Valverde 95dee44a77 const gpointer -> gconstpointer
'const gpointer' is the same as 'void *const'. Replace with gconstpointer
where straightforward (assuming that was the intent) and use gpointer everywhere
else for clarity (that does not change *API* constness contract; it just means
a variable is not declared immutable inside the called funtion).

Change-Id: Iad2ef13205bfb4ff0056b2bce056353b58942267
Reviewed-on: https://code.wireshark.org/review/13945
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-16 05:10:49 +00:00
Stig Bjørlykke 44f74e7b26 Qt: Add FindLineEdit with regex search option
Add settings to the QLineEdit context menu to use textual or regular
expression search.  Use this in Follow Stream and Show Packet Bytes.

Change-Id: I3a9f5a923f616629aa40a334921871f98b518f30
Reviewed-on: https://code.wireshark.org/review/13942
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-02-15 19:44:27 +00:00
Alexis La Goutte 5dbc727ae9 tango_color(.h): avoid ‘tango_butter_3’ defined but not used [-Werror=unused-const-variable] found by gcc6
Change-Id: I5500c7228003358421d2aa40808213ef739e765b
Reviewed-on: https://code.wireshark.org/review/13906
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-14 18:28:40 +00:00
Gerald Combs 40739389ce [Automatic update for 2016-02-14]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I85afd74e86c8e38f9ddc73ec92c26d7f24776743
Reviewed-on: https://code.wireshark.org/review/13938
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-14 16:06:21 +00:00
Stig Bjørlykke 9dd7465b22 Qt: Add Show as C Array and YAML in Show Packet Bytes
Change-Id: Ib9ccd72128f55741d4c94cf849f8e0f8866c2cb7
Reviewed-on: https://code.wireshark.org/review/13907
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-02-11 21:42:01 +00:00
Stig Bjørlykke eefcbc0a59 Qt: Add hint label in Show Packet Bytes
Show frame number, field name (abbrev) and number of bytes.
Added some translations.

Change-Id: I9777d43d63a52fcdb221864bad097a9604522d3a
Reviewed-on: https://code.wireshark.org/review/13888
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-02-11 07:36:01 +00:00
Mikael Kanstrup 7a1eca1726 extcap: Convert settings to preference friendly key names
Preferences are only allowed to contain lowercase ASCII letters,
numbers, underscores or dot characters. Create a utility function
to convert an extcap setting to its equivalent preference key and
use it wherever conversion from setting to preference key is needed.

Bug: 12064
Change-Id: I39bbac7de5f0f905bd41c54257fa997a3b32442d
Reviewed-on: https://code.wireshark.org/review/13687
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-11 06:40:16 +00:00
Pascal Quantin 8186ab3d9f Qt: fix jitter buffer management
Small bugs were introduced when copy/pasting the code from GTK UI:
- arrive_offset is stored in seconds and not milliseconds
- some tests regarding the current playback mode were wrong

Change-Id: I21fb82ba8ff6c8defa7df90c815c040e9e074aaa
Reviewed-on: https://code.wireshark.org/review/13885
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>
2016-02-10 20:26:21 +00:00
Stig Bjørlykke fe2656b407 Qt: Fix plural translations
Change-Id: I17df0c0a3462b7ccdda2105204c0ad72e80fc175
Reviewed-on: https://code.wireshark.org/review/13882
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-10 20:02:44 +00:00
Stig Bjørlykke dccaaa2dcd Qt: Align hex dump text in follow stream
Put some extra spaces between hex and text output in follow stream
hex dump to align with the layout used in ByteViewText.

Change-Id: Ie2743ccf46a8941595580878955e96b9ada56de9
Reviewed-on: https://code.wireshark.org/review/13867
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-10 10:09:57 +00:00
Stig Bjørlykke e2bb302a79 Qt: Add Show as Hex Dump in Show Packet Bytes
Change-Id: I81a42ef263d87880cfe0d1230dbbcb692e473d6f
Reviewed-on: https://code.wireshark.org/review/13868
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-10 09:32:06 +00:00
Guy Harris ab977a86d0 Properly check the return value of color_filters_set_tmp().
It returns FALSE, not TRUE, on failure.

Bug: 12101
Change-Id: I2fb4f407d2040e7b84f17af197de81555d64c647
Reviewed-on: https://code.wireshark.org/review/13857
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-09 21:18:02 +00:00
Gerald Combs 0af5ef3fce QCP: Fix retina label calculations.
The retina fixes in gb10bad1 and gb3f3d66 were incomplete and caused
rendering problems in our axis labels. Handle the device pixel ratio in
a couple of more places so that our axis rects are correctly sized.

Add a switch (WS_ENABLE_DP_RATIO) to make it easy to turn scaling on and
off.

Change-Id: I633d94d633e0743be2a607c9a4cbb3409e9eed62
Ping-Bug: 11710
Reviewed-on: https://code.wireshark.org/review/13834
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-02-08 23:26:28 +00:00
Gerald Combs 477769b823 Qt: Restore sequence diagram labels, other fixes.
SequenceDiagram implements time, address, and comment labels using
QCPAxis::setTickVector and QCPAxis::setTickVectorLabels. It also calls
QCPAxis::setTicks(false) so that we don't draw tick marks. It appears
that doing so also disables the labels themselves in our current version
of QCP. Set the tick pen to Qt::NoPen instead.

Only draw node lines where we have nodes.

Add notes about a retina issue and the need for zooming.

Bug: 11710
Change-Id: I88c30a1ddcd29832f86b1ca8c018c7fa6b6d64a7
Reviewed-on: https://code.wireshark.org/review/13781
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-02-08 17:32:13 +00:00
Stig Bjørlykke 1b5382caa5 Qt: Add Show Packet Bytes Dialog
Show selected packet bytes as ASCII, HTML, Image, ISO 8859-1, Raw or UTF-8.
Images supported are what's supported by QImage, and HTML supported
is what's supported by QTextEdit.

Change-Id: I96fc5c5d222c5389078576463cf78d82cf55528d
Reviewed-on: https://code.wireshark.org/review/13807
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-08 16:54:12 +00:00
Gerald Combs 31cecd60f5 [Automatic update for 2016-02-07]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: If7d44f7c40a98454261f9f71ce7e084a16b5add7
Reviewed-on: https://code.wireshark.org/review/13799
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-07 16:06:58 +00:00
Stig Bjørlykke cc679ca5ce Qt: Add check for field extractors
The proto tree is needed in several cases when using Lua field extractors,
because they fetch values from the tree.  Without a valid field extractor
a Lua plugin may misbehave and display wrong column info.

This fixes column issues when:
- Calling resetColumns() in Qt.  This involves adding a display filter,
  change time display format, change name resolution and other changes
  in UI which requires column updates.
- Print summary lines.
- Export as CSV and PSML.

Change-Id: Ieed6f8578cdf2759f1f836cd8413a4529b7bbd80
Reviewed-on: https://code.wireshark.org/review/13708
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-02-05 05:35:02 +00:00
Stig Bjørlykke 4c144c5d8c Qt: Reset columns before auto resize time columns
When changing timestamp format, timestamp precision and display seconds
with hours and minutes we must reset columns before auto resizing the
time columns to get the size of the new column values.

Without this we will resize to the length of the preference we are
changing from, which is not what we want.

Change-Id: If7081bf0b9b6f6974232cea0b3fe0186c904f2a2
Reviewed-on: https://code.wireshark.org/review/13711
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-02-05 05:33:22 +00:00
Peter Wu 8899e006aa Fix memleaks related to get_dirname
get_dirname may return NULL instead of the original string, so avoid
patterns like get_dirname(strdup(x)). Writing to
cf_path.toUtf8().data() is fine btw, toUtf8() returns new memory.

This fixes two memleak reported by LeakSanitizer via fileset_add_dir and
MainWindow::captureFileReadFinished (both via cf_callback_invoke).

Change-Id: I0f1528763e77e1f55b54b6674c890a9d02302ee8
Reviewed-on: https://code.wireshark.org/review/13691
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-04 04:57:30 +00:00
João Valverde eeafb47a12 Fix Qt4 moc option argument and add build parametrization
Change-Id: Ib758f0eabaf96f9c6010201e7e16147fcfa0daa2
Reviewed-on: https://code.wireshark.org/review/13671
Petri-Dish: João Valverde <j@v6e.pt>
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>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-03 09:10:20 +00:00
Gerald Combs 8834e8f894 Display Filter Expression dialog updates.
De Morganize an expression.

Clear the selection at start. Selecting the first item (104apci) seems
to confuse people.

Change-Id: I8fcd1f068f1801042a2658940175b46bdfb2b462
Reviewed-on: https://code.wireshark.org/review/13647
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-02-02 16:51:00 +00:00