Commit Graph

55 Commits

Author SHA1 Message Date
Peter Wu a5f9b4e06d Qt: fix tracer and selection of packet in IO Graph
Do not assume first graph in the list, pick the first visible graph.
This (1) fixes the tracer which would otherwise show a marker at an
non-obvious position that is not located on the graph and (2) fixes the
GoToPacket action when clicking on the graph.

Bug: 13537
Change-Id: I49d750102ad25c8539aa2e44fe1583cd535dd471
Reviewed-on: https://code.wireshark.org/review/20768
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-05 09:26:59 +00:00
Peter Wu 0ea51ad822 Qt: Fix uninitialized memory access in val_units_
Fixes the following UBSAN errors:

    ui/qt/io_graph_dialog.cpp:1720:75: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t'
        #0 0x5611f0b0cd1d in IOGraph::setFilter(QString const&) ui/qt/io_graph_dialog.cpp:1720:75
        #1 0x5611f0b737a1 in IOGraph::IOGraph(QCustomPlot*) ui/qt/io_graph_dialog.cpp:1682:5
        #2 0x5611f0afb3f3 in IOGraphDialog::addGraph(bool, QString, QString, int, IOGraph::PlotStyles, io_graph_item_unit_t, QString, int) ui/qt/io_graph_dialog.cpp:340:24
        #3 0x5611f0af7c19 in IOGraphDialog::IOGraphDialog(QWidget&, CaptureFile&) ui/qt/io_graph_dialog.cpp:289:13

    ui/qt/io_graph_dialog.cpp:1818:19: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t'
        #0 0x5611f0b1167e in IOGraph::setPlotStyle(int) ui/qt/io_graph_dialog.cpp:1818:19
        #1 0x5611f0b062ee in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:420:10

    ui/qt/io_graph_dialog.cpp:1872:29: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t'
        #0 0x5611f0b13e6a in IOGraph::setValueUnits(int) ui/qt/io_graph_dialog.cpp:1872:29
        #1 0x5611f0b06640 in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:422:10

Note that calling setFilter with an empty string is pretty useless,
especially since the filter is initialized later, so remove it.
The choice for IOG_ITEM_UNIT_FIRST is quite arbitrary and needed because
setValueUnits reads the "old" (uninitialized) value.

Change-Id: I32c65a30593cb718b838c0f324e0d1b0eaab90e5
Reviewed-on: https://code.wireshark.org/review/20767
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-03-30 22:28:01 +00:00
Michael Mann f5ed8a4306 Fix "warning C6246: Local declaration hides declaration of the same name in outer scope" warnings
Change-Id: I0dbf8d0236b163da568a173ccedc3072bd039caa
Reviewed-on: https://code.wireshark.org/review/20739
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-03-27 15:23:34 +00:00
Stig Bjørlykke e781fdd180 Qt: Fix heap-use-after-free when deleting IO graph
Deleting a IO graph item while editing a field will use the IOGraph
object so ensure we delete in correct order to avoid heap-use-after-free.

Bug: 13234
Change-Id: I6d0de21684f842fbd67c9b38fc6b75b81aec5518
Reviewed-on: https://code.wireshark.org/review/20456
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>
2017-03-09 09:22:45 +00:00
Stig Bjørlykke 26e62dfad0 Qt: Fix -Wshorten-64-to-32 warnings
Fix some warnings when building with -Wshorten-64-to-32 flag for
C++ code.

Fixes for warnings from QList, QTimer and QVector has been pushed
upstream, so some time we may be able to enable this flag for C++.

Change-Id: Iae7457f9afc469c63f3edbe23dbf272b5c6c9e5e
Reviewed-on: https://code.wireshark.org/review/20310
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>
2017-02-28 11:41:32 +00:00
Roland Knall 3df81a0550 Qt: Remove unneccessary Q_DECLARE_METATYPE
Remove unnecessary Q_DECLARE_METATYPE macros and replace calls
to QVariant conversions with VariantPointer where necessary

Change-Id: Ia4690590095f930bf94644197de7fa30b00ee7ec
Reviewed-on: https://code.wireshark.org/review/19611
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-12 16:04:00 +00:00
Dario Lombardo 805ddd1add uat: add a reset callback.
This function will free the resources allocated by the caller.

Change-Id: Ib486c14e4fd3c321662fb71f7fd06733ce9a64a4
Reviewed-on: https://code.wireshark.org/review/19375
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-12 12:39:15 +00:00
Stig Bjørlykke 057b6bbd2e Qt: Set Close as default button
Set Close as default button in some statistics dialogs.

Change-Id: I82e17d27de256aabaec1633bb973c554eec907c3
Reviewed-on: https://code.wireshark.org/review/17685
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-09-14 06:25:22 +00:00
Michael Mann 5c1d58b482 Add field completion suggestions when adding a Display filter or Y Field to the IO Graph
Bug: 11899
Change-Id: I7cee36581dc773daa691dad10500124ab66520bc
Reviewed-on: https://code.wireshark.org/review/16023
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-20 01:26:53 +00:00
Pascal Quantin a383e692c8 Revert "tap: change glib functions to wmem."
This reverts commit 2e9f3c5d36.

It breaks the registration of codec, dissector and libwiretap plugins.

Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de
Reviewed-on: https://code.wireshark.org/review/16012
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-19 10:47:10 +00:00
Dario Lombardo 2e9f3c5d36 tap: change glib functions to wmem.
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf
Reviewed-on: https://code.wireshark.org/review/15270
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-17 15:38:03 +00:00
Stig Bjørlykke 1a716800e3 Qt: Add dialog geometry restore
Add GeometryStateDialog class to handle load and save dialog geometry.
The QDialog class name will be used as window name.  For shared
classes the UAT name or the statistics title or abbr will be used.

Change-Id: I5a019598307fb3861518f41e733de834788184d8
Reviewed-on: https://code.wireshark.org/review/14139
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-28 18:25:50 +00:00
Jim Young 0fa13371d1 Qt io_graph: Use Interval value when generating Y-axis label or legend
The I/O Graph allows the user to choose from several different Y-axis units.
Three of the selectable Y-axis units unconditionally imply a per-second
time unit (/s) regardless of the actual I/O Graph Interval value selected.
In addition the Y-axis label includes the “/s” as a suffix regardless of the
current Interval value.

This patch removes "/s" suffix from the Y-axis pick-list units.  This patch
also dynamically adds the selected Interval value to the Y-Axis label or
alternatively as the first line of the legend box that is displayed if the
various enabled graphs have differing Y-axis values.  For readability the
pick-list values for sub-second Interval values are changed to 1 ms, 10 ms
and 100 ms from the original pick-list values of 0.001 sec, 0.01 sec and
0.1 sec respectively.

To support adding a “Title” to the legend, the QCustomPlot widget is
augmented with “Legend Title” source authored by “David” as posted at:

  http://www.qcustomplot.com/index.php/support/forum/443

Note: This patch changes the valid Y-axis unit values stored within the
io_graphs preferences files.  Any io_graphs files having entries with the
now obsolete Y-Axis values of “Packets/s”, “Bytes/s” or “Bits/s“ will be
silently upgraded to “Packets”, "Bytes" and "Bits" respectively when
saved.

Bug: 11855
Change-Id: I503ff6dc20b09d90f087342084fb0db6e0080c7f
Reviewed-on: https://code.wireshark.org/review/12219
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24 00:13:42 +00:00
Guy Harris a7f470fa24 More pinfo->fd->abs_ts to pinfo->abs_ts.
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac
Reviewed-on: https://code.wireshark.org/review/13501
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:58:56 +00:00
Stig Bjørlykke a18af795fa Qt: It's no translation for "%1 %2"
Change-Id: If50a19b34b5f1c0076fcee76e59a45c307a9b2db
Reviewed-on: https://code.wireshark.org/review/12456
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-07 02:55:51 +00:00
Gerald Combs 79f7edba15 Qt: Don't expose ColorUtils::graph_colors_.
Make graph_colors_ private and accessible via getters. Blind attempt at
fixing bug 11833.

Bug: 11833
Change-Id: I03b7e90c686374d2d0f046f7e5fe87e43939dc82
Reviewed-on: https://code.wireshark.org/review/12318
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-01 05:17:59 +00:00
Gerald Combs ec68330053 Qt: Fixup the I/O Graph color menu width on Windows.
Change-Id: I2032709fe62810a292121e8624a4b51f40070c36
Reviewed-on: https://code.wireshark.org/review/11921
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-11-17 21:59:57 +00:00
Jim Young bf8ec76d40 Qt iograph: Trigger graph refresh when time-of-day checkbox is toggeled.
Bug: 11692
Change-Id: I2d9d17d3474210b5eb73002e131867d936426e36
Reviewed-on: https://code.wireshark.org/review/11837
Petri-Dish: 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-11-16 16:50:13 +00:00
Jim Young 9451e529c4 Qt iograph: Fix off-by-one, insure we plot the last interval.
Bug: 11693
Change-Id: I035eaf7ff049e3631714c112daa5adb29bb90470
Reviewed-on: https://code.wireshark.org/review/11858
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-16 05:00:36 +00:00
Stig Bjørlykke 1b6bf76604 Qt: Fixed signal name to avoid a warning.
Also terminate stream lines with endl.

Change-Id: Icbbe5b47695506888c03607ff0af66c59306faae
Reviewed-on: https://code.wireshark.org/review/11778
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-13 06:02:52 +00:00
Stig Bjørlykke 864872ed61 Qt: Added IO Graph save to clipboard button.
Also added save as CSV file.
Do not add double quotes for values as we do in GTK.

Change-Id: I8576a73e10b71cdba0c8c80db8b21927d19528da
Reviewed-on: https://code.wireshark.org/review/11732
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-12 07:00:33 +00:00
Michal Labedzki 78978ec63f Qt: Protect against unintentional "no capture file" window status
If capture file was closed and we have some WiresharkDialogs opened,
then we still need to know filename of capture file
related to specific dialog.

Change-Id: I15f0e5176b87713bf747eead64021619d0bdf039
Reviewed-on: https://code.wireshark.org/review/11025
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2015-10-27 16:45:19 +00:00
Jim Young 460e1d8728 Qt: Horizontal- and vertical-only zoom modifier keys for IO and TCP Stream graphs.
Use lower case "x" or upper case "X" (Shift-X) to zoom in or out respectively only
the horizontal (X) axis.  Use lower case "y" or upper case "Y" (Shift-Y) to zoom
in or out respectively only the vertical (Y) axis.

Change-Id: I2f4de3c81795c289a626cc917d46ec0b1d620f49
Reviewed-on: https://code.wireshark.org/review/10894
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-10 01:15:14 +00:00
Gerald Combs 082b0d7ba2 Fix an I/O graph crash.
QTreeWidget::removeItemWidget calls QAbstractItemView::setIndexWidget, 
which deletes the current item widget. As a result we shouldn't try to
delete itemWidgets ourselves.

Add a note explaining why we use hand-crafted item widgets instead of a
custom item delegate.

Bug: 11449
Change-Id: I485bacc0fae60ea3174e003ef0032948ee5c720f
Reviewed-on: https://code.wireshark.org/review/10820
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-06 15:23:04 +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
Stig Bjørlykke 7b35992b7a Reload IO Graph Y fields when reload Lua plugins
Change-Id: Ic3b9096c3c25839dd7d7bfe7af71eeb5b0bd745d
Reviewed-on: https://code.wireshark.org/review/10239
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-08-26 18:03:39 +00:00
Gerald Combs f7e9a795a8 Add per-dialog progress frames.
Add ProgressFame::addToButtonBox, which violates the UX guidelines on
every platform we support by inserting a ProgressFrame into a
QDialogButtonBox.

Call addToButtonBox in the constructors of a bunch of dialogs.

Change-Id: I33ac5fd7a976ee6e0527de569a5c4b528980dae1
Reviewed-on: https://code.wireshark.org/review/10242
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-26 14:47:07 +00:00
Stig Bjørlykke 950f1dde9e IO Graphs: Don't show unchecked graphs in legend
Change-Id: I0a9c4d967ee03a0a8dfc93f87dbe38e4e3a0404c
Reviewed-on: https://code.wireshark.org/review/10128
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-20 08:12:59 +00:00
Gerald Combs d8d3c52f1e Use an ellipsis character instead of three dots.
The OS X Human Interface Guidelines at

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/TerminologyWording.html#//apple_ref/doc/uid/20000957-CH15-SW3

says:

"Be sure to create the ellipsis character using the key combination
 Option-; (Option-semicolon). This ensures that an assistive app can
 provide the correct interpretation of the character to a disabled user.
 If you use three period characters to simulate an ellipsis, many
 assistive apps will be unable to make sense of them. Also, three period
 characters and an ellipsis don't look the same because the periods are
 spaced differently than the points of an ellipsis."

The Windows desktop applications guidelines has a section on ellipses:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn742478.aspx

but doesn't specify the a single glyph vs three dots.

The GNOME HIG at

https://developer.gnome.org/hig/stable/typography.html.en

says "Take Advantage of Unicode" then specifically says to use U+2026
HORIZONTAL ELLIPSIS.

Remove the ellipsis from "Find Next" and "Find Previous". Neither
requires user interaction.

Change-Id: I0e6c28bb8b3a84b242731e2ca96f1a6f6f42c303
Reviewed-on: https://code.wireshark.org/review/9833
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-31 18:55:06 +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 d564ea9bea Qt: Add Colorize Conversation menu items.
Add the "View→Colorize Conversation" menu similar to the GTK+ UI. Add
the "Reset" item under the "Colorize Conversation" menu instead of the
top-level "View" menu. Make sure the "Reset" shortcut is Ctrl+Space even
on OS X. Normally Qt would convert it to Cmd+Space, but that's used by
Spotlight.

Add StockIcon::colorIcon and use it to create filled square icons.

Change-Id: I2af9e26d025cdaf97482422bbb9440e28e18d1ac
Reviewed-on: https://code.wireshark.org/review/9595
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-11 00:41:01 +00:00
Joerg Mayer 0619ed241c Finish removal of Q_UNUSED.
Todo: qcustomplot via upstream

Change-Id: I19cf98f1281ecb1f6efbb7d36c997d5aa43f5baf
Reviewed-on: https://code.wireshark.org/review/9547
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-07 22:17:22 +00:00
Martin Kaiser 534d1d5eae Qt: use <> for including the generated ui_*.h files
this should make Visual Studio pick up the generated include files
from the build directory instead of the source directory (which may
contain lefovers from an in-tree build)

Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b
Reviewed-on: https://code.wireshark.org/review/9129
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 17:11:19 +00:00
Gerald Combs 1dc608a05e Morph ProgressBar into CaptureProgressFrame.
Switch from a plain QProgressBar to a QFrame with a QProgressBar and a
stop button.

Add a stop_flag boolean to the capture_file struct.

To do:
- Start adding the progress bar to dialogs.
- Don't complain so loudly when the user stops a capture.

Change-Id: Iedd1d7d79f2044f1a53e4fb22186d25930a3ef03
Reviewed-on: https://code.wireshark.org/review/9029
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 06:06:37 +00:00
Gerald Combs a04a894731 Qt: Stop tapping when the I/O Graph dialog closes.
Add a setCaptureStopFlag function to ProgressBar. Add a stopTapping
function and setCaptureStopFlag signal to CaptureFile. Use the new
plubming to stop tapping when the IO Graph dialog closes.

Bug: 10116
Change-Id: Ic46814eed18933f511d9d1ff37e2e7918741f353
Reviewed-on: https://code.wireshark.org/review/8480
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-15 21:48:03 +00:00
Guy Harris 5e67ae78ba Get rid of an unused structure member.
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801
Reviewed-on: https://code.wireshark.org/review/7573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-07 04:41:09 +00:00
Gerald Combs b3f3d669e5 Update Qt version checks.
It looks like QPaintDevice::devicePixelRatio() was added in 5.1.

Back out some debugging code.

Change-Id: I40f19c0d7901ce95f587531983e5c6644daf64f4
Reviewed-on: https://code.wireshark.org/review/7226
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 02:14:59 +00:00
Gerald Combs b10bad126a Fix QCustmPlot retina problems.
Make sure our intermediate pixmaps have the same number of pixels as the
screen.

A merge request with the same changes has been made upstream.

Change-Id: I19950181d52f347e3aa7f5abb6e9ad33a4097abf
Reviewed-on: https://code.wireshark.org/review/7224
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 01:19:46 +00:00
Gerald Combs 6e88978fd9 Qt: More #include → forward declarations.
Change-Id: Ib6de71f801cd3053374b6c867370acd594dcd396
Reviewed-on: https://code.wireshark.org/review/7089
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-02-13 02:31:16 +00:00
Gerald Combs c34ded4ae2 Qt/C++: Change a bunch of includes to forward declarations.
In theory this this should reduce compilation times. On my particular
system it makes no difference but hopefully it will elsewhere.

Change-Id: I570177d3ca4eec691c82d46b4dbbce74092aac1d
Reviewed-on: https://code.wireshark.org/review/7060
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-02-10 19:59:43 +00:00
Gerald Combs 00f7bc4b3d Qt: Fix IO Graph capture file closing.
Make sure our IOGraphs remove their respective tap listeners before the
capture file closes, otherwise the graph data ends up getting cleared
via reset_tap_listeners.

Bug: 10871
Change-Id: I0ef2af2dc84be1921a930df8bb68f63626aa874a
Reviewed-on: https://code.wireshark.org/review/6925
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-03 01:20:36 +00:00
Guy Harris cfcbb28671 Clean up ftype-conversion and dfilter error message string handling.
Have dfilter_compile() take an additional gchar ** argument, pointing to
a gchar * item that, on error, gets set to point to a g_malloc()ed error
string.  That removes one bit of global state from the display filter
parser, and doesn't impose a fixed limit on the error message strings.

Have fvalue_from_string() and fvalue_from_unparsed() take a gchar **
argument, pointer to a gchar * item, rather than an error-reporting
function, and set the gchar * item to point to a g_malloc()ed error
string on an error.

Allow either gchar ** argument to be null; if the argument is null, no
error message is allocated or provided.

Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c
Reviewed-on: https://code.wireshark.org/review/6608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:22:59 +00:00
Guy Harris 9f5e4fb7a5 uat_load() and uat_save() return a success indication; use it.
Instead of always ignoring the return value, always check it, and only
report an error if it returns FALSE.

(Alternative: have it return NULL on success and a pointer to a
g_malloc()ed string on failure.)

Fix a comment while we're at it.

Change-Id: Icb72c9f47775b6552e3eb4fe5ddcc85482bfb5fb
Reviewed-on: https://code.wireshark.org/review/6528
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 21:01:28 +00:00
Michael Mann 7967ef9510 Remove emem APIs from UAT functionality.
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856
Reviewed-on: https://code.wireshark.org/review/6460
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-12 14:25:12 +00:00
Gerald Combs 91e4330394 Qt: Convert more dialog titles.
Change-Id: I9c3e3471a92b7af9347a541bece3d9405d37dce0
Reviewed-on: https://code.wireshark.org/review/6193
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-31 22:48:17 +00:00
Gerald Combs 4556498f33 Qt: Convert more dialogs to WiresharkDialog.
Make the Sequence, IO Graph, Statistics Tree, and VoIP Calls dialogs
subclasses of WiresharkDialog.

Remove "Stats Tree" from Statistics Tree dialog titles. Don't complain
if the user opens more than one instance of the dialog.

Use the applicationName property in WiresharkApplication instead of a
separate variable.

Add a preexisting item to the IO Graph bug list (hovering when the file
is closed clears the graph).

Change-Id: I8411a25305d00b16e0d4a82fa50a9bad5c85b239
Reviewed-on: https://code.wireshark.org/review/6125
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-30 03:34:03 +00:00
Guy Harris 4d3c4c4f12 Rename stat_cmd_args.[ch] to stat_tap_ui.[ch].
The intent is to handle more than just command-line arguments; reflect that.

Change-Id: Ia10efda85a9d11c6579d1bec6f789cee30d9e825
Reviewed-on: https://code.wireshark.org/review/5304
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 18:52:06 +00:00
Guy Harris a21436eaed tap_ui -> stat_tap_ui.
The old routine had stat_ in the name, as the expectation was that they
were for statistics taps; that's still the expectation, so have stat_ in
the data structure and routine names.

Change-Id: Ic98d011012b8641173d41fa0ec4f4e625614370a
Reviewed-on: https://code.wireshark.org/review/5303
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 18:42:50 +00:00
Guy Harris 7390516f61 For tap UIs, register a list of parameters and some menu information.
The intent here is to centralize more UI information so that we can move
more tap UI stuff to common code.  This is a beginning.

Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30
Reviewed-on: https://code.wireshark.org/review/5301
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14 18:31:34 +00:00
Guy Harris 24d1295720 Don't give names to parameters you don't use.
C++, unlike C, lets you do that.  This squelches warnings from MSVC++.

Change-Id: Id7127392b7690769111afdb951951d743f1d5e63
Reviewed-on: https://code.wireshark.org/review/4019
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-06 22:59:21 +00:00