Commit Graph

85 Commits

Author SHA1 Message Date
Gerald Combs 9b07412277 Qt: Add a packet diagram view.
Add a new top-level view that shows each packet as a series of diagrams
similar to what you'd find in a networking textook or an RFC.

Add proto_item_set_bits_offset_len so that we can display some diagram
fields correctly.

Bugs / to do:
  - Make this a separate dialog instead of a main window view?
  - Handle bitfields / flags

Change-Id: Iba4897a5bf1dcd73929dde6210d5483cf07f54df
Reviewed-on: https://code.wireshark.org/review/37497
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-10 18:17:50 +00:00
Gerald Combs 76d92ba7e7 Qt: Updates for 5.15.
Fix the following deprecation issues for Qt 5.15:

Use Qt::WindowFlags() instead of 0 in Qt >= 5.6.

Pass Qt::SkipEmptyParts instead of QString::SkipEmptyParts to QString::split() in Qt >= 5.15.

Use QMultiMap instead of QMap where we were using QMap::uniqeKeys().

Use QCP::Interactions() instead of 0.

Use '\n' instead of QTextStream::endl.

Use QWheelEvent::angleDelta() instead of QWheelEvent::angle().

Change-Id: Ie2d69d3a396c0821c2c34f506ddad6f8e22f7049
Reviewed-on: https://code.wireshark.org/review/37334
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-30 06:45:07 +00:00
Martin Kaiser 64b6b68efa TCPStreamDialog: prevent access to uninitialized memory
If we launch a TCPStreamDialog in a situation where we can't select a
corresponding tcp stream, we leave the constructor before graph_
is initialized.

Later on, the destructor calls graph_segment_list_free(&graph_).
This requires that graph_ was initialized before.

Make sure that we initialize graph_ in the constructor, regardless
of errors.

(There's other aspects of this issue. We shouldn't be able to
launch a TCPStreamDialog when we have no tcp stream...)

Change-Id: I7b4ddadca8f699d30ec45f0fe6021ae9d36ced53
Reviewed-on: https://code.wireshark.org/review/36935
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-26 06:13:54 +00:00
Stig Bjørlykke 6b589151a2 Qt: Fix memory leak in TCP Stream Dialog
Do not copy addresses at when dialog opens, they will be initialized
in tapall_tcpip_packet(). Do not clear addresses when switching stream,
they will be properly removed in graph_segment_list_free().

Correctly free addresses in graph_segment_list_free() which is called
when switching stream and when closing the dialog. Free copied addresses
when switching direction (address swap).

Remove redundant and unused code.

Change-Id: I4328aa4df333f59c587f841b74a24dc71d329079
Reviewed-on: https://code.wireshark.org/review/36840
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
2020-04-14 15:35:55 +00:00
Tomasz Moń eb7774e4c1 Qt: Improve tcptrace graph drag responsiveness
Subclass QCPErrorBars with implementation that never accepts clicks.
This prevents a lot of square root computations in QCustomPlot
mousePressEvent handle and results in usable tcptrace graph.

An alternative solution to the poor performance problem could be using
QCP::srmCustom SelectionRectMode. I don't know how to implement graph
drag with QCP::srmCustom, and thus I went with simple subclass approach.

Bug: 16281
Change-Id: Id4178e59bdbd2222db4669d0635ff741ebde839f
Reviewed-on: https://code.wireshark.org/review/36413
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-16 05:05:48 +00:00
Gerald Combs 48024b102d Qt: Make sure shortcuts are visible in context menus.
As of Qt 5.10, context menu shortcuts can be hidden:

https://bugreports.qt.io/browse/QTBUG-61181

Add set_action_shortcuts_visible_in_context_menu to qt_ui_utils and call
it for our context menus as needed. For Qt 5.{10,11,12} it calls
QAction::setShortcutVisibleInContextMenu(true).

For Qt 5.13 and later, call
QStyleHints::setShowShortcutsInContextMenus(true) in
WiresharkApplication.

Change-Id: Ie8941951c3a9801b4642f4ce15ac217e37d1300f
Reviewed-on: https://code.wireshark.org/review/35761
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-13 18:58:28 +00:00
Gerald Combs 999e63543f Qt: Add elements back to the tcptrace graph.
Segment and SACK elements in the tcptrace graph are plotted using
QCustomPlot's error bars. This part of QCP's API changed from version 1
to 2, and were #ifdef'ed out as part of the switch to QCP 2.0.1. Update
our code to use the new API.

Bug: 16281
Change-Id: Ieae2808686ddc631e0cd18c0c32fc7a2c0f396b7
Reviewed-on: https://code.wireshark.org/review/35726
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-10 04:57:52 +00:00
Stig Bjørlykke a51c58fa1b Qt: Cleanup space inside parentheses
Remove randomly used space inside parentheses to make the coding
style uniform. Add space after if, for and while.

Change-Id: I519f5994b6f73d8a57a5004d51ca460276c618fe
Reviewed-on: https://code.wireshark.org/review/35112
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 20:43:10 +00:00
Alexis La Goutte 828ff6ddb0 Qt: Fix issues found by clang.
Fix the following issues:

../ui/qt/rtp_player_dialog.cpp:88:21: error: unused variable 'wf_graph_selected_width_' [-Werror,-Wunused-const-variable]
static const double wf_graph_selected_width_ = 2.0;
                    ^

 In file included from /home/vasko/sources/wireshark/ui/qt/sequence_diagram.cpp:10:
/home/vasko/sources/wireshark/ui/qt/sequence_diagram.h:59:20: error: 'selectTest' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
    virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const;
                   ^
/home/vasko/sources/wireshark/ui/qt/widgets/qcustomplot.h:3330:18: note: overridden virtual function is here
/home/vasko/sources/wireshark/ui/qt/tcp_stream_dialog.cpp:60:12: error: unused variable 'graph_color_4' [-Werror,-Wunused-const-variable]
const QRgb graph_color_4 = tango_scarlet_red_4;
           ^
/home/vasko/sources/wireshark/ui/qt/tcp_stream_dialog.cpp:61:12: error: unused variable 'graph_color_5' [-Werror,-Wunused-const-variable]
const QRgb graph_color_5 = tango_scarlet_red_6;
           ^

Change-Id: Ic0d96939cc13fc550aa6857ddc75fe498e7104ea
Reviewed-on: https://code.wireshark.org/review/34555
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-17 19:23:56 +00:00
Alexis La Goutte ef500e800a Update to qcustomplot 2.0.1
Upgrade the internal version of QCustomPlot to 2.0.1

Change-Id: I1eb372d8e6a2f6c1bbdde4c74596785bf2d405c2
Reviewed-on: https://code.wireshark.org/review/17980
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-09-17 08:34:46 +00:00
Peter Wu ac041b9d0b Qt: fix memleak from cf_get_display_name
Free the memory as documented.

Change-Id: I8a8842160be676bb08f5b93e795b9ed8edef2ede
Reviewed-on: https://code.wireshark.org/review/27829
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-30 08:18:47 +00:00
Gerald Combs 62999cc677 Windows: Make sure more native dialogs handle HiDPI.
Add a WiresharkFileDialog class, which is a thin wrapper around a few
QFileDialog functions that sets per-monitor v2 DPI awareness before
showing native dialogs and resets the awareness context afterward.
Use it where we call QFileDialog::getXXX.

Change-Id: Ib711a70aa94b693a2515804a729f666ea7fbd673
Reviewed-on: https://code.wireshark.org/review/27568
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16 04:22:20 +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
Roland Knall 3a928f1f87 Qt: Remove checks for version below 5.2
This stops the main source from being buildable by Qt 4.x

Change-Id: I61edbae04ac2b3bf0ae8ee8e09d335083945c176
Reviewed-on: https://code.wireshark.org/review/26756
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:48:57 +00:00
Gerald Combs acaff5ad2d Qt: TCP Stream Graphs dialog updates.
Add duplicate ACK ticks to Statistics → TCP Stream Graphs → Time
Sequence (tcptrace), which I missed when porting from GTK+. Add zero
window crosses while we're here.

Switch TCPStreamDialog to a subclass of GeometryStateDialog.

Add a slot and URL for the Help button and a stub entry in the User's
Guide.

Bug: 12009
Change-Id: Idf2ddb9eb33d924d65998285b5cffc234156497c
Reviewed-on: https://code.wireshark.org/review/26592
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-26 04:25:23 +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 e52172c775 Qt: use SPDX identifiers.
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3
Reviewed-on: https://code.wireshark.org/review/25563
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:36 +00:00
Dario Lombardo 727fac4559 Qt: remove unneeded check (CID: 1415729).
base_graph_ is always set in the constructor.

Change-Id: I760e26a612458c15b47cd5381a6b7eb284b2cdf4
Reviewed-on: https://code.wireshark.org/review/25041
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:29:13 +00:00
Kevin Hogan f9207b0f6c Qt: Restore ability to display RTT by sequence number
Adds a checkbox to the TCP Stream Dialog's "Round-trip-time"
graph tab that allows user to choose sequence number
on the x-axis rather than time.

Bug: 13740
Change-Id: Iaf881318437c7eecd16cf6c1f8745283ce9b4a7d
Reviewed-on: https://code.wireshark.org/review/23376
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-20 08:43:02 +00:00
Pascal Quantin 94ce35a9f9 Qt: check QVector size before accessing its content and not after
Bug: 14017
Change-Id: Ied38551c78b4593f60165d9e3b04bb3913d6b258
Reviewed-on: https://code.wireshark.org/review/23310
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: Michael Mann <mmann78@netscape.net>
2017-08-30 16:00:07 +00:00
Roland Knall ddfc1d37cc Qt: Move utils to separate utils directory
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-07-26 10:11:55 +00:00
Dario Lombardo d4ae8032ed Qt: add initializers (CID 1162824).
Change-Id: I46f56fb99c75eebc6418fa7ac88995f49abedc91
Reviewed-on: https://code.wireshark.org/review/22645
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-16 16:12:17 +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
Kevin Hogan 799827b503 Qt: Add Goodput graph (ACK rate), and minor bug fixes
Add Goodput graph:
 - measures rate of ACKed bytes (including SACKed bytes)
 - useful to compare to throughput during slow-start to estimate
     bottleneck rate

Add graph selection checkboxes to multi-plot graphs:
 - most important for Throughput, since there are good cases
     for showing a subset of graphs at once
 - also added for Window Scale, since the addition is similar
     to that for Throughput

Minor bug fixes:
 - allow zoom rect to work when growing in any direction
     (not just right and up)
 - keep stray mouse clicks from re-doing a previous zoom
 - hide rubber band if active when keypress changes mouse mode
     to drag
 - allow mouse clicks on open space or grpah to return to default focus
     (i.e. focus on graph)

Change-Id: Id29356ceec810ebdbed9c3c0d8415416401fe643
Reviewed-on: https://code.wireshark.org/review/19718
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-01-22 14:41:49 +00:00
Kevin Hogan 73b5e3d008 Qt: modify RTT graph (handle GSO, SACK, etc), plus bug fixes
Modifications to RTT graph:
 - change x-axis to time (s) rather than sequence number
    [ avoids sequence number wraparound ambiguity, plus
       easier to correlate RTT changes to tcptrace graph ]
 - change RTT computation to properly handle acks to GSO packets
 - change RTT computation to take SACK blocks into account

Bug fixes:
 - eliminate potential memory leak if some packets are unacked
 - ensure RTT graph is shown if TCPGraph window is opened to it directly

Change-Id: I2bdcab97399ebde0f15c78fa19c882529a814580
Reviewed-on: https://code.wireshark.org/review/19662
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-20 00:35:34 +00:00
Kevin Hogan 259a3e508f Qt: add graph of unacked (outstanding) bytes to window scale graph
This metric is commonly used as an estimate of the sender's congestion window.
[ when examining a capture taken from the sender ]

Change-Id: I812d5556cef477c08ef1e5d396fbdddda9a6751e
Reviewed-on: https://code.wireshark.org/review/19661
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-19 10:00:23 +00:00
Jaap Keuter d5abca0cf5 Fix TCP stream graph (throughput) reset axes logic (CID-1398438)
The code seems to be ment to latch the reset axes flag for graph update.

Change-Id: I7b47346c45aa7576c98a251eb3ebcd9188407000
Reviewed-on: https://code.wireshark.org/review/19581
Reviewed-by: Kevin Hogan <kwabena@google.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-09 05:28:13 +00:00
Kevin Hogan 3fae1366d1 Qt: add SACK graphs to tcptrace graph
Primarily, this adds visual indication of SACK blocks to tcptrace.
In addition:
 - cleaned up focus behavior for graph selector and spinboxes
 - added time-delay update to streamNumber spinBox
    (similar to behavior of maWindow spinBox)
 - changed ACK selection to select only SACKed responses
    (rather than all ACKs - SACKs seemed more useful to look at)

Change-Id: I47d9e98d54f14e4955008ecea791b77f805c8ba9
Reviewed-on: https://code.wireshark.org/review/19388
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-04 05:24:30 +00:00
Kevin Hogan 5f6732d74e Qt: minor updates to TCP stream dialog and throughput moving average
The time-based moving average code should use a constant window size
  as the denominator when calculating throughput.
Added QDoubleSpinbox widget to choose the time-based moving average size.
Also added (optional) ability to select ACK (reverse) packets as well as data
  packets when clicking on the base graph.
  (useful, for example, when examining SACK or DSACK packets)
Added CheckBox widget (with tooltip) for user to choose ACK selection

Change-Id: Ib3ba4f9be9e30aa8f3088b0b2d48b4ca214f7cc3
Reviewed-on: https://code.wireshark.org/review/19108
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-19 06:04:56 +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
Dario Lombardo 50d1d59213 Qt: add initializers (CID 1162824).
Change-Id: Ib570d3531bfdd35404b75d49dbd7dd43db4c30d9
Reviewed-on: https://code.wireshark.org/review/16310
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-07-06 06:48:10 +00:00
Guy Harris 24f02dafcd Add checks to address setting routines.
Fail if:

	1) you have an AT_NONE address with data;

	2) you have a non-AT_NONE address with a zero length and a
	   non-null data pointer, or with a non-zero length and a null
	   data pointer.

When comparing addresses for equality, just make sure the types are the
same, the lengths are the same and, if the lengths are non-zero, the
data is the same; don't treat AT_NONE specially - the "lengths are
non-zero" check will make sure we do the right thing.

Make sure when we create an AT_NONE address it has a zero length and
null data pointer.

Change-Id: I5c452ef0d140c2d9aef3004f1cfd124a95b78fb2
Reviewed-on: https://code.wireshark.org/review/15839
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-12 01:59:54 +00:00
Uli Heilmeier 894804acd0 QT: TCP Stream Graph: Fix index number
setMaximum() for stream index before calling setValue()

Bug: 12163
Change-Id: Ic1678bc5282a7a01b96a39a44790949b743acf7f
Reviewed-on: https://code.wireshark.org/review/14332
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-03 21:33:45 +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
Stig Bjørlykke 720f57d000 ui: Code cleanup
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>
2016-01-23 23:15:54 +00:00
Pascal Quantin 06b75181a0 Qt: fix a crash when trying to open TCP stream graph on a truncated TCP packet
Do not try to show TCP stream graph window if it was rejected in constructor

Change-Id: I4d1401e2c356391ceb8c8e3d37a668fc2a9fc92f
Reviewed-on: https://code.wireshark.org/review/13454
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: Anders Broman <a.broman58@gmail.com>
2016-01-20 23:39:15 +00:00
Pascal Quantin 4b35048af3 Qt: ensure to call destructor when closing a few QDialog windows
Change-Id: I10d2a610e852fdc2f38b84e561f04783af0d612e
Reviewed-on: https://code.wireshark.org/review/13453
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-20 23:38:26 +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
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
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 25ec198dd4 Disable streamNumberSpinBox while reloading capture
When changing stream in TCPStreamDialog it should not be possible
to change stream again until the capture has reloaded, because
this will give a crash when doing graph_segment_list_free() or
graph_segment_list_get() while already doing this.

Also disable mouseMove event (showing packet details) while reloading,
as this also will give a crash.

We should consider also having a reload progress bar in the
TCPStreamDialog to indicate that this is happening when having
large capture files, as the main window may not be visible.

Change-Id: I622f9e0de8205bc1fd18101dc03100079d7a2d06
Reviewed-on: https://code.wireshark.org/review/10159
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-24 07:43:04 +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
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
Joerg Mayer 8ad9019c3f Commit d4aa1a1c24 added some Q_UNUSED
statements to c++ files. The standard method to mark function parameters
as unused in cpp is to just leave out the variable name.

Change-Id: I4f07ad9f494ad16388eadb67e93ea7b26ae70eb5
Reviewed-on: https://code.wireshark.org/review/9152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-26 00:21:14 +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
Pascal Quantin d4aa1a1c24 Qt: mark unused parameters as such
Change-Id: Ib53d6da0d6660cf2c6a3283ff6123a2f18a8abda
Reviewed-on: https://code.wireshark.org/review/9128
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-25 16:13:34 +00:00
Jeff Morriss 1810112f2d Add minimize and maximize buttons to the TCP stream dialogs.
The first thing I generally do when I open a graph is to maximize it.
Having a maximize button makes that a lot easier. Call QDialog(NULL,
Qt::Window) similar to g80342e4.

Call QDialog(NULL) in the about box.

Change-Id: I4f229ab579d0912cb03ba8f8d0300d933d0ba914
Reviewed-on: https://code.wireshark.org/review/7072
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-25 15:51:29 +00:00
Gerald Combs 67b069e544 Qt: Add address conversion convenience routines
Add address_to_qstring and address_to_display_qstring, which wrap
address_to_string and address_to_display respectively and return
QStrings. Convert most of the instances in ui/qt to the new routines.

Fix a some memory leaks in the process.

Change-Id: Icda80bbfe0b2df723d54c8da84355255f819af89
Reviewed-on: https://code.wireshark.org/review/6848
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-01-29 22:51:43 +00:00
Michael Mann 55de46f317 Replace ep_address_to_str with address_to_str.
Change-Id: I4f1078b20f41800f72a751612703ad0d4c2ae87b
Reviewed-on: https://code.wireshark.org/review/6323
Reviewed-by: Michael Mann <mmann78@netscape.net>
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>
2015-01-06 07:38:18 +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