Commit Graph

525 Commits

Author SHA1 Message Date
Guy Harris e013c5ec7f Clean up URLs.
Add ui/urls.h to define some URLs on various of our websites.  Use the
GitLab URL for the wiki.  Add a macro to generate wiki URLs.

Update wiki URLs in comments etc.

Use the #defined URL for the docs page in
WelcomePage::on_helpLabel_clicked; that removes the last user of
topic_online_url(), so get rid of it and swallow it up into
topic_action_url().
2020-10-02 20:13:42 -07:00
Gerald Combs d2da4c7afb Qt: Use … instead of UTF8_HORIZONTAL_ELLIPSIS in translated strings.
Run

$ gsed -i -e 's/\(tr *(.*".*\)" *UTF8_HORIZONTAL_ELLIPSIS/\1…"/' $( ag -l 'tr *\(.*" *UTF8_HORIZONTAL_ELLIPSIS' )
$ gsed -i -e 's/\(tr *( *\)UTF8_HORIZONTAL_ELLIPSIS *"/\1"…/' $( ag -l 'tr *\( *UTF8_HORIZONTAL_ELLIPSIS *"' )

in ui/qt. As discussed in #16812, the UTF8_ macros were required at one
time because we only allowed ASCII in our source code. However, that
requirement has since been relaxed and Qt's translation framework
doesn't handle concatenating strings and macros very well.
2020-10-01 06:40:14 +00:00
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
Stig Bjørlykke e1df757c46 Qt: Improve status bar messages
Use pushStatus() in C++ code, improve translation support and end
each message with a dot.

Change-Id: I3f673da4736c3fe49203048da282afa1abf92337
Reviewed-on: https://code.wireshark.org/review/37887
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-18 04:02:23 +00:00
Stig Bjørlykke 3ff0a55d5c Qt: Check if "Apply as Column" column already exists
Use the existing (possible hidden) column when doing "Apply as Column"
on a field which is already used as a custom column. This will help
prevent having multiple equal custom columns, where all will be hidden
at startup and profile change when only one of them are configured as
hidden.

Multiple equal columns can always be manually configured using
"Preferences -> Appearance -> Columns" if this is intended.

Change-Id: Ib03893facfa3f194f3b3303645fb3f9313ec9e91
Reviewed-on: https://code.wireshark.org/review/37861
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-15 03:57:01 +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
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
Stig Bjørlykke a2dc713c11 Qt: Fix Copy Description from context menu
Fix Copy->Description from context menu in Packet List and
Packet Dialog. This was broken in gf6534b8a.

Align MainWindow::actionEditCopyTriggered() using the same procedure.

Improve ProtoTree::ctxCopyVisibleItems().

Bug: 16323
Change-Id: I564b73c027019bc59629aa84098db8f307e92d40
Reviewed-on: https://code.wireshark.org/review/36339
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-09 04:47:54 +00:00
Tomasz Moń d400dbe476 Qt: Remove unnecessary processEvents() call
MainWindow::captureFileReadStarted() is called inside event handlers.
There isn't any actual processing after the captureFileReadStarted() is
called so in most cases the code will quickly return to the event loop.
In case of cf_read() callbacks, there is dedicated "slow processing"
detection implemented that eventually leads to processEvent() call in
update_progress_dlg().

Change-Id: Icfefa0ba7bf1bec43014e30756d0eec4078d389c
Reviewed-on: https://code.wireshark.org/review/36113
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-02-16 13:51:34 +00:00
Peter Wu 55f83324ef Qt: simplify decode_as_ action in the packet details view
Use the "create_new" property convention similar to PacketList. Fix a
"QWidget::insertAction: Attempt to insert null action" warning in the
packet dialog while at it.

Change-Id: I29b3b113aba92634b1b9a3427e2313fca30633eb
Reviewed-on: https://code.wireshark.org/review/36023
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-05 04:34:36 +00:00
Orgad Shaneh 0442f7a2c3 UI: Fix compilation with Qt 5.14
Change-Id: I8adae4609ff2857cb12bc803839ebb2c6afbd264
Reviewed-on: https://code.wireshark.org/review/35517
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-21 20:25:51 +00:00
Gerald Combs 7be2d964f0 Qt: We show preference panes using their module names.
PreferencesDialog::setPane takes a preference module name. Fix a
comparison in PrefModuleTreeView::setPane and update some variable names
in order to make things a bit more obvious.

Modernize some related code while we're here.

Bug: 16250
Change-Id: I8f4c7e5261a219e3f32e6e9a71574d81b1852219
Reviewed-on: https://code.wireshark.org/review/35304
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-04 20:31:59 +00:00
Gerald Combs 997e21d1e9 Qt: Rename the Capture Interfaces dialog to Capture Options.
Rename Capture Interfaces to Capture Options to match its main menu
item. "Options" also more closely matches what the dialog actually does.

Fixup a help item URL while we're here.

Change-Id: Iec8bdfc9f7ae6fc4fd9e97bb366b63cff139f3a6
Reviewed-on: https://code.wireshark.org/review/35294
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>
2019-12-03 03:16:16 +00:00
Peter Wu c9bb676118 Qt: fix crash on Next/Previous Packet in Conversation without selection
Protect against a NULL edt pointer. That can occur when the packet
details view is empty, e.g. when no packet is selected.

Bug: 16228
Change-Id: Ie9621db4b84b504e4d9cee2add5004df2e383970
Reviewed-on: https://code.wireshark.org/review/35204
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-25 06:42:54 +00:00
Roland Knall 8f90446db5 Qt: Refactor ExportObjectsDialog
Add the following features:

- search now operates live (enter text changes the list live)
- filter by content-types
- Preview certain content types directly from the dialog

Change-Id: If47b64d475dd3e77485a28e8443a3e139e9bd1a4
Reviewed-on: https://code.wireshark.org/review/35182
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-11-22 05:10:16 +00:00
Roland Knall 59ce14522b Qt: Fix nullpointer access
Due to changes with the frameSelect, this null pointer check
now fails or more on the point is more obvious. It was masked
previous

Change-Id: I11c3f3440e39742bce963d1ef8bdd27076baa700
Reviewed-on: https://code.wireshark.org/review/35177
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 12:05:56 +00:00
Roland Knall cfee0f8082 Qt: Remove frameSelect signal
As all frameSelect signals now transport a QList<int> of selected
frames, use this instead

Change-Id: I1888e45a4df997920aebde9706ca0ae803bdba03
Reviewed-on: https://code.wireshark.org/review/35176
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-21 10:59:05 +00:00
Mike78 b7ce4e3f7a Qt: Include Column Headings with Edit -> Copy -> Plain Text / CSV
Bug: 16215
Change-Id: Ie59aa354be055831055a294724f8d7b800d35d90
Reviewed-on: https://code.wireshark.org/review/35153
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-20 15:04:15 +00:00
Guy Harris 309bf5b547 Make sure Copy > As Text and Copy > As CSV add a final newline.
Bug: 16214
Change-Id: Idb691c1fbb33b2fabca5726c159b1f754668c1ae
Reviewed-on: https://code.wireshark.org/review/35147
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-11-20 02:46:45 +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
Roland Knall b3f240dbf8 Qt: Multiselection in PacketList
This implements multi-selection for the PacketList. It
allows multiple lines to be selected, and either drag/drop
them to a text editor or use Ctrl/Cmd+C to copy the content
to a clipboard.

Opening the context menu disables the selection, and it
does not change the underlying currently selection. This is
done on purpose, as multi-selection is a copy-task only
functionality at this point

Export & Print work as expected, exporting just the selected
items. Same goes for the copy menu, which has the additional
entries for copying the list elements

Bug: 14612
Change-Id: I77960aa1ab1d172a21abfa469baac0cd57f9f9d9
Reviewed-on: https://code.wireshark.org/review/35073
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-17 12:20:29 +00:00
Gerald Combs 02057200fd macOS: Add support for automatic updates using Sparkle.
Add support for automatic updates using the Sparkle framework. Add
FindSparkle.cmake and associated CMake plumbing. Add a public key and
other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which
wraps the Sparkle API. Make code that's specific to WinSparkle
Windows-only.

Add Sparkle installation steps to the macos-setup scripts. Sparkle
prints a warning if your bundle is unsigned (which is the case during
development) so disable installing it by default.

Updating here takes a long time. We might be able to fix that by
shipping our DSYMs separately.

Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5
Reviewed-on: https://code.wireshark.org/review/35090
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 18:39:04 +00:00
Roland Knall 3c8c392b9d Qt: Cleanup push/pop Infos
Currently push pop is propagated by a massive load of signals
which partly are also propagated through parent objects.

This moves the status handling to WiresharkApplication, also
pathlining future moves to move status to different classes or
use additional methods of status information

Change-Id: Ibcb2c98688f1adf40dce1483f336596ef992bb06
Reviewed-on: https://code.wireshark.org/review/35071
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-12 22:03:23 +00:00
Stig Bjørlykke abfa0d6218 Qt: Keep extcap control channels when capturing to multiple files
When using the "Create a new file automatically" feature the capture in
Wireshark will stop and start, but the extcap utility will continue run
as normal. Ensure the control channels are kept when doing this.

Rename the unused capture_session.session_started to session_will_restart
to detect this.

Bug: 16178
Change-Id: I6797c982760a1013fca2a24699befff1dc82f28c
Reviewed-on: https://code.wireshark.org/review/35013
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-07 12:53:47 +00:00
Roland Knall a218460e22 Qt: IOGraph display filter graph added
Add a graph for the currently display filter if none exists, upon
opening IOGraph

Change-Id: Ic25b014484898dd1917b13f2616fd519e2e8183b
Reviewed-on: https://code.wireshark.org/review/34984
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-05 15:50:50 +00:00
Roland Knall d21078309d Qt: Hide Searchbar if the icon is activated again
Change-Id: Ic478cc29ac1e0685737580da7110ec9f5d06d313
Reviewed-on: https://code.wireshark.org/review/34950
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-04 13:11:10 +00:00
Stig Bjørlykke a673a50ad8 epan: Rename dissector_filters.c to conversation_filter.c
For the same reason as in g89c9d909.

Change-Id: I5e344ebdf8ba05d169484aa32b409d84edc6124f
Reviewed-on: https://code.wireshark.org/review/34943
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-04 10:17:16 +00:00
Tomasz Moń 7e2aada266 Qt: Connect destroyed() signal to flushAppSignals()
Connect destroyed(QWidget *) signal instead of finished(int) to
flushAppSignals(). This is to ensure that flushAppSignals() is executed
after any potential accepted() or rejected() slots.

This fixes the code flow for preferences update. That is, the signals are
first queued in PreferencesDialog::on_buttonBox_accepted() before
flushAppSignal() is executed.

Change-Id: Ie1497df66adb52cdc10d1b7c701f531d4eeb7351
Reviewed-on: https://code.wireshark.org/review/34823
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-21 17:34:00 +00:00
Roland Knall cb352105b8 Qt: Reduce use of CaptureFile
In preparation of having just a single instance of CaptureFile
dialogs are redesigned to not use CaptureFile

Change-Id: I2bff036d6f9e946954873c90b935b6653fbeb474
Reviewed-on: https://code.wireshark.org/review/34723
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-07 21:00:31 +00:00
Peter Wu d2a660d805 QUIC: Add Follow QUIC Stream support to Qt and tshark
The QUIC transport protocol provides a stream, similar to HTTP/2. Make
it possible to look at the stream contents. This can be helpful while
HTTP/3 support is not yet complete.

Known issues that will be addressed in the future:

 - If a single packet contains multiple streams, then Follow QUIC Stream
   will wrongly include data from streams other than the selected one.
   This is tracked by bug 16093 and affects HTTP/2 as well.

 - The Substream index menu does not properly filter for available
   stream numbers. If a non-existing stream is selected, then changing
   to another (potentially valid) index results in the "Capture file
   invalid." error. As workaround, clear the display filter first.

 - Follow Stream always selects Stream ID 0 instead of the first or
   currently selected stream field in a packet. Users should manually
   update the stream index as needed.

Change-Id: I5866be380d58c96f0a71a29abdbd1be20ae3534a
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/34694
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-04 04:36:09 +00:00
Tomasz Moń f67eccedd9 Qt: Do not spin unnecessary additional event loops
Show the dialogs asynchronously so no new event loops are created. This
not only simplifies stack traces (reduces the nesting level) but also
prevents hard to debug problems (eg. Bug 15743) from happening.

Change-Id: I85821a1403839a5baca504b40efce0ede2f1e0cb
Reviewed-on: https://code.wireshark.org/review/34646
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>
2019-10-01 03:53:46 +00:00
Peter Wu e768e13479 Qt: Fix Follow Stream regression in Conversations dialog
The "Follow Stream" button did not have any effect due to:

    QObject::connect: No such slot MainWindow::openFollowStreamDialog(follow_type_t, guint) in /tmp/wireshark/ui/qt/main_window_slots.cpp:3034
    QObject::connect:  (sender name:   'TrafficTableDialog')
    QObject::connect:  (receiver name: 'MainWindow')

Change-Id: If9ecae9a971bdc31358d95af33a8245aa5df5911
Fixes: v3.1.1rc0-352-g9fff62e2a8 ("Qt, http2: Add Follow HTTP/2 Stream functionality")
Reviewed-on: https://code.wireshark.org/review/34653
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-30 05:45:07 +00:00
Roland Knall b43177e1f0 Qt: Fix invalid pointer for model
Ideally it should never happen, that the model is being queried
outside it's scope, which is ONLY the PacketList. MainWindow is
the last place where such queries should happen. In the meantime
a check for invalid model is being added.

Bug: 16065
Change-Id: I9a3fa39333d55dbbb7ebcac87f39da7bd8547486
Reviewed-on: https://code.wireshark.org/review/34591
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-09-22 15:00:18 +00:00
Alexander Gryanko 9fff62e2a8 Qt, http2: Add Follow HTTP/2 Stream functionality
The HTTP/2 protocol multiplexes a single TCP connection into multiple
independent streams. The Follow TCP output can interleave multiple
HTTP/2 streams, making it harder to analyze a single HTTP/2 stream.

Add the ability to select HTTP/2 Streams within a TCP stream.
Internally, the HTTP/2 dissector now stores the known Stream IDs in a
set for every TCP session which allows an amortized O(n) lookup time for
the previous/next/max Stream ID.

[Peter: make the dissector responsible for clamping the HTTP/2 Stream ID
instead of the Qt code, that should permit future optimizations.]

Change-Id: I5d78f29904ae8f227ae36e1a883155c0ed719200
Reviewed-on: https://code.wireshark.org/review/32221
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexander Gryanko <xpahos@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-22 05:29:30 +00:00
Roland Knall a53545c0c8 Qt: Add macro for g_list_next for C++
Using a simple (type *) cast on g_list_next results in a warning
with modern compilers "old-style cast"

Adding a warning for g_list_next and data access to avoid the warning

A good overview why reinterpret_cast has been used can be found here:

https://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-const-cast-and-reinterpret-cast-be-used

It is a 1:1 replacement in this case, but does not use any of the new
cast styles and therefore should be used with caution.

Change-Id: I989f237afc39aaf40133a788b1c0bbd7a51bf974
Reviewed-on: https://code.wireshark.org/review/34284
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-30 13:37:25 +00:00
Roland Knall cd8f720251 Qt: Move Apply/Prepare to general QMenu handler
Also clarify the method by which the filter can be selected. From the
main menu only selected filters from a ProtoTree can be selected,
therefore the code for PacketList handling has been removed.

Change-Id: I5e5827d763ab3b25db14a384581f283238f96d28
Reviewed-on: https://code.wireshark.org/review/34384
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-29 07:51:45 +00:00
Roland Knall c9361120f0 Qt: Remove unnecessary code for context menus
This code is no longer required, as context menus should
be bound to local events.

As for "Reloading LUA plugins" - the keyboard shortcut would
be able to trigger while the menu is open, except Qt explicitely
prevents that

Change-Id: Id18a3a17d62bae1ff547a6ef96772e12a2535219
Reviewed-on: https://code.wireshark.org/review/34371
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-26 19:57:24 +00:00
Roland Knall 3870e6c036 Qt: Make Apply/Prepare filter independent
The context menu should only use information readily available
at the point of creation. Copying actions from the mainwindow
introduces a bunch of synchronization and consistency issues.

This is a first step to move away from a centralized approach
of managing actions, towards a distributed approach. As a side
effect, this also solves the old issue of having the apply
items greyed out in context menu

Bug: 16001
Bug: 15323
Change-Id: I10c6df11cbab0a89386f5bf1d27759103df2a012
Reviewed-on: https://code.wireshark.org/review/34370
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-26 19:39:14 +00:00
Roland Knall 372fc9ff6c Qt: Fix Preference dialog translation
The title names of each section are not presented correctly

Bug: 15977
Change-Id: I68ab0fb6fc7131f9d2af67fa38c509ed6808c7d3
Reviewed-on: https://code.wireshark.org/review/34218
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-09 11:03:07 +00:00
Roland Knall 806bef47a2 Qt: Add a Contextmenu for the PacketDialog
Add a context menu for the packet dialog, including items for

* all the expand/collapse items
* copy information from the packet tree
* Wiki protocol page/filter field reference/protocol preferences

Change-Id: I165e03960cc07aefaa38acb9c97fe29d762a5e2e
Bug: 3537
Reviewed-on: https://code.wireshark.org/review/34111
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-28 22:25:38 +00:00
Roland Knall 66e92e7276 Qt: Do not export the model of the packetlist
Exporting the model for the packetlist via a function prohibits implementing
further models (sorting) inside the packetlist

Change-Id: Ica159fc8f242ae1a5b657507a26e33827c366bee
Reviewed-on: https://code.wireshark.org/review/33834
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-07-04 03:55:55 +00:00
Roland Knall 9ad5dc26dd Qt: Move widgets to sub-directory
General code cleanup

Change-Id: Ic99fc24b8f8c6142a7ec46f535f8d5b896236390
Reviewed-on: https://code.wireshark.org/review/33769
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-01 06:55:45 +00:00
Stig Bjørlykke 15cae4650f ui: Refactoring column_prefs_add_custom
Unify column_prefs_add_custom() and column_prefs_add_custom_with_position()
because the former is unused in the current implementation.

Remove the unused custom_occurrence parameter.

Change-Id: Ib018b9dc614674fc175810827ef789ef469059eb
Reviewed-on: https://code.wireshark.org/review/33760
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-30 13:08:40 +00:00
Roland Knall 1e7f85e02f Qt: Prevent hidden global parameters
Remove the hidden global parameter settings

Change-Id: I186dfb22d972abf8de2e37ccd0a4d76340b188dc
Reviewed-on: https://code.wireshark.org/review/33762
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-29 12:23:26 +00:00
Stig Bjørlykke 44c5e62635 Qt: Fix default position when "Apply as Column"
The default position for a column when "Apply as Column" is before
the Info column if this is last, else add last.

This bug was introduced in g5ae259c4.

Change-Id: I68adaec5092e0ed1c65e771f171c42000fdc83fc
Reviewed-on: https://code.wireshark.org/review/33759
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-06-28 09:18:15 +00:00
Dario Lombardo 1af6e1f860 tap: add credentials tap.
This new tap collects credentials (username and paassword)
from the dissectors.

So far, few dissectors have been instrumented:
- http (basic auth)
- http (header auth)
- ftp
Others can be instrumented as well using the same technique.

Tshark has a new option (-z credentials) and Wireshark a new
"tools" menu: the documentation has been updated accordingly.

Change-Id: I2d0d96598c85bb3ea4fb5ec090dd8dc28b481fc9
Reviewed-on: https://code.wireshark.org/review/33453
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-06-26 07:09:54 +00:00
Roland Knall d370f54c47 Qt: Fix Contextmenu for Packetlist
The context menu got removed, adding it back

Change-Id: Ia44a6ed576a88be5a07d76c184740a2fd9bfa844
Reviewed-on: https://code.wireshark.org/review/33602
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-14 21:18:40 +00:00
Roland Knall e39f2bb517 Qt: Move Packetlist Header Context Menu to subclass
This is a cleanup patch to remove unused or unnecessary code from
packet list and put it in its respective header class for better
code maintenance

Change-Id: Ib7d7f34ab9cdd802199b3f279499855c80f8f0c5
Reviewed-on: https://code.wireshark.org/review/33587
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-13 19:11:35 +00:00
Roland Knall 5ae259c495 Qt: Allow dropping fields to add columns and indicate width
Allows for dropping fields on the columns to add them as well as indicate
width while dragging the columns

Change-Id: Ic98ae431886e5eb2ebd9ba50390742995bf22d5a
Reviewed-on: https://code.wireshark.org/review/33573
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-13 15:11:10 +00:00
Tomasz Moń 47a39b06ef Qt: Delete extcap option dialog when it is closed
Prior to this change the extcap option dialog destructor was called only
when the main Wireshark window closed.

Besides that, fix the NULL pointer dereference that would happen if
device name was not a valid extcap device.

Change-Id: I84334e3a83c66557d961771f74c39447d30a6875
Reviewed-on: https://code.wireshark.org/review/33197
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-15 06:58:40 +00:00