Commit Graph

12 Commits

Author SHA1 Message Date
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
Gerald Combs 9222bd77cd Remove unneeded modelines in ui.
Remove the editor modeline blocks from the source files in ui that use 4
space indentation by running

perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -l shiftwidth=4 $( ag -g '\.(c|cpp|h|m|mm)') )

This gives us one source of indentation truth for these files, and it
*shouldn't* affect anyone since

- These files match 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.
2021-04-20 07:43:39 +00:00
Alexander Meier 0f57ad35c8 IO Graph shows unsigned values correctly
IO Graph used to show unsigned integer values not correctly when using
SUM, MAX, MIN or LOAD. For example was the uint32 0x9b37d2b8 shown as
about -1_679_000_000 while it should be shown as 2_604_126_904.
This patch fixes the incorrect type conversions so that unsigned
integer are shown properly in IO Graph.

Change-Id: Ib361e63cce9e088bfdd4b3d3186725c67d33f1bd
Reviewed-on: https://code.wireshark.org/review/35550
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-18 12:17:24 +00:00
Dario Lombardo 7969c41519 Use I/O Graphs instead of IO graphs everywhere.
Change-Id: I6ce866b03632965dd1bad6eff361d91dd210c62b
Reviewed-on: https://code.wireshark.org/review/33680
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-20 20:01:00 +00:00
Guy Harris 2a0d6a7194 Attempt to squelch a narrowing warning.
Some older versions of Clang appear to think dividing a float by a
64-bit integer is narrowing 64 bits to 32 bits.

Change-Id: Ie3148ee6d5d5d0810d01e7d985b8e4320dacf565
Reviewed-on: https://code.wireshark.org/review/29518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-09 19:55:17 +00:00
Jakub Zawadzki de447c1544 sharkd: add support for io graph.
Change-Id: I8d23a2b55024e2ef8c644dcef9176c7e3050a703
Reviewed-on: https://code.wireshark.org/review/27376
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-31 18:43:50 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56:37 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
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-08 14:57:36 +00:00
Dario Lombardo e5f4ef0c42 ui: use SPDX identifiers.
Change-Id: I6b05399395bcc35e59b73b4030ba4a05711a7b1a
Reviewed-on: https://code.wireshark.org/review/25565
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:04 +00:00
Alexis La Goutte 9e0251f218 io_graph_item: fix false positive array subscript is above array bounds [-Werror=array-bounds]
Change-Id: I14fc19f131782a9c85104ca2189b9452079d0013
Reviewed-on: https://code.wireshark.org/review/20454
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-03-10 02:48:09 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Gerald Combs a5cb72fe9e Add a Qt I/O Graph dialog.
For each graph you can set:
- Its visibility
- A name
- A display filter
- Color, from a fixed list
- Plot style: Line, Impulse, Bar, Stacked Bar, Dot, Square, Diamond
- Basic Y Axes (packets/s, bytes/s, bits/s)
- Computed Y Axes (SUM, MIN, AVG, MAX)
- Smoothing

You can pan and zoom using the mouse and keyboard. Clicking on a graph
selects the last packet for that interval. If all graphs have the same Y
axis a single label is shown, otherwise a legend is shown.

The time scale (X axis) can be toggled between relative seconds and the
time of day.

Graphs can be saved as PDF, PNG, BMP, and JPEG. Settings are "sticky"
via the io_graphs UAT.

To do:
- Minimize graph drawing delays.
- Figure out why smoothing differs from GTK+
- Everything else at the top of io_graph_dialog.cpp
- Fix empty resets.

A fair amount of code was copied from TCPStreamDialog. We might want to
subclass QCustomPlot and place the shared code there.

Move common syntax checking to SyntaxLineEdit.

Move some common code from ui/gtk/io_stat.c to ui/io_graph_item.[ch] and
use it in both GTK+ and Qt.

Make the io_graph_item_t array allocation in io_stat.c static. The
behavior should be identical and this gives us additional compile-time
checks.

Change-Id: I9a3d544469b7048f0761fdbf7bcf20f44ae76577
Reviewed-on: https://code.wireshark.org/review/435
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-04-07 20:56:42 +00:00