Commit Graph

22 Commits

Author SHA1 Message Date
John Thacker 15dfa3aa20 Qt: Fix order of ShowAs enums
The ShowAs enum should stay in the same order as the Items
are added to the ShowAs combobox, because setCurrentIndex()
is used with the enum values, e.g. when setting the value to
"Show As Image" when the bytes are an image.
Fixup c9e08b7be3
2023-02-01 21:18:58 -05:00
John Thacker 95b45b2555 Qt: Add percent-encoding to Show Packet Bytes
Add Percent-encoding to the list of encoding types that Show
Packet Bytes can handle.

There's a function added to glib 2.66 to handle this for arbitrary
bytes that might have internal nulls (and which allows the result
to be non UTF-8), but we don't require that version yet, so extend
the existing function.

Related to #1084
2022-09-03 17:25:28 +00:00
Stig Bjørlykke 9a11d75d4d Qt: Add Show as Json in Show Packet Bytes
Show as human readable indented Json.
2022-02-06 10:54:18 +00:00
Thibaut Vandervelden c9e08b7be3 Add ShowAsRustArray option 2022-01-16 08:07:44 +00:00
Moshe Kaplan 3953ddcf57 Add UI header files to Doxygen
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
2021-11-30 08:01:36 -05:00
Joerg Mayer 5bb7e1606b Fix some of the compile errors when compiling with Qt6
This is basically applying c knowledge and Google to the compiler
error messages. There is basically no understanding involved into
what I was doing:
- No idea why lots of #includes needed to be added for Qt6
- No idea how to actually fix the remaining problems, but it's a start

Things that need to be done:
- The AudioDeviceInfo thingy needs to be replaced by something new (as
  an interim solution another patch disables the audio player in Qt6).
- GRegExp eventually needs to be replaced by QRegularExpression
  (available since Qt5.0, so development can be done in Qt5).
- Solutions for the other problems like some methods no longer
  being available in Qt6 that have to sort of co-exist with Qt5.
2021-11-24 10:31:16 +00:00
Stig Bjørlykke 147aadea44 Qt: Add Decode as Hex Digits in Show Packet Bytes
Non-hex character in the data are skipped, enabling the decoding
to continue converting all hex digits found.
2021-09-11 14:41:15 +02:00
Gerald Combs d3f17ee08a Remove modelines in ui/qt.
Remove the editor modeline blocks from most of the source files in ui/qt
by running

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

then cleaning up the remaining files by hand.

This *shouldn't* affect anyone since

- All of the source files in ui/qt use 4 space indentation, which
  matches 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-03-08 18:11:32 +00:00
Jirka Novak 8dd8491713 Qt framework: Dialogs are correctly notified when capture file was closed
The patch reintroduces WiresharkDialog::captureFileClosed() method and
calls captureFileClosing() and captureFileClosed() in right order.
Both methods call updateWidgets() at its end.

All dialogs were reviewed and captureFileClosing/Closed methods updated
when appropriate.
captureEvent() method in multiple dialogs changed to captureFileClosing/Closed
as it does same actions - looks like old style of detecting of capture
file closing.
2021-01-11 13:30:18 +00:00
John Thacker 9fc054a65b Add all supported charsets to Show Packet Bytes/Follow Stream
Use the QT text codec support to add charset conversions for all character
encodings supported by QT to Show Packet Bytes and Follow Stream (Save As
will convert to UTF-8.) Note that this is dynamic and the exact list will
depend on the version of QT and if libicu support is enabled. This does
make the list of codecs pretty long, so hopefully it shows up well on all
the different QT styles.

This does not yet support when multibyte characters span more than one packet
in Follow Stream, though the current code doesn't do that for UTF-8 or UTF-16
already. This is probably most useful for HTTP captures.

Bug: 16137
Change-Id: I6d5cd761a5d9d914b7a787fe8eb02b07b19642e6
Ping-Bug: 16630
Reviewed-on: https://code.wireshark.org/review/37707
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-07-06 14:21:41 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Stig Bjørlykke bba0041bfd Qt: Add Show as UTF-16 in Show Packet Bytes
Change-Id: Ia7c7af162ac0010e2a5b83caf1ac467012432567
Reviewed-on: https://code.wireshark.org/review/27420
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-09 09:33:24 +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 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
Stig Bjørlykke 6eae028843 Qt: Add Decode as Quoted-Printable in Show Packet Bytes
Change-Id: I4697b979702e4df83b1ec85b9a3619409c0b366c
Reviewed-on: https://code.wireshark.org/review/15500
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-05-19 11:18:12 +00:00
Stig Bjørlykke 3c6dab95b4 Qt: Improve Show Packet Bytes
- Add ShowAsASCIIandControl to keep ShowAsASCII only ASCII printable.
- Enable show selected when ShowAsRAW.
- Use QString::fromLatin1() when ShowAs8859_1.
- Don't replace null with symbol for null when ShowAsUTF8.

Change-Id: I25750247160e33d342fde12e6a998e3198270acf
Reviewed-on: https://code.wireshark.org/review/14220
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-28 19:00:12 +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
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
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 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
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