Commit Graph

264 Commits

Author SHA1 Message Date
Gerald Combs 2c62e2eb3f CMake: Set Qt autogen properties for Wireshark.
It looks like multi-configuration generators (notably MSBuild) need
Qt autogen properties set on the wireshark target as well as qtui. Do
so unconditionally in both cases. (We were doing so conditionally for
qtui before.)
2021-05-14 07:55:25 +00:00
Gerald Combs 826e03c9f4 CMake: Apply AUTO{MOC,UIC,RCC} more selectively.
Set CMAKE_AUTO{MOC,UIC,RCC} if we're running CMake 3.20.0 or 3.20.1 in
order to work around CMake issue 22085, otherwise set the AUTOMOC,
AUTOUIC, and AUTORCC properties for the qtui target. The latter is
preferred since it keeps us from running Qt's meta-object, user
interface, or resource compilers on code outside of ui/qt. Ping #17314.
2021-05-06 19:14:15 -07:00
Jirka Novak 54b7886a5e RTP Player: Memory consumption improvements
Audio for play is now decoded and stored without silence parts.

Changes:
- ui/qt/utils/rtp_audio_file.cpp created to handle silence skipping
- ui/qt/rtp_audio_stream.cpp refactored to support it
- Fixed issue with exporting streams: File synchronized export was missing
leading silence.
- No line is shown in waveform graph if there is silence
2021-04-25 19:34:52 +02:00
Tomasz Moń 4bd5830cda CMake: Add ENABLE_VLD option for MSVC
Calling cmake with -DENABLE_VLD=ON when building with Visual Studio,
results in debug configuration being linked to Visual Leak Detector.
By default, Visual Leak Detector outputs the leak summary to Visual
Studio debug window. When ENABLE_VLD is active, VLD is linked to all
wireshark libraries and executables.
2021-04-10 21:53:59 +00:00
Gerald Combs a80ea46ff7 CMake: Enable AUTO{MOC,UIC,RCC} according to our CMake version.
As noted in be2b0fc810, we need to set CMAKE_AUTO* before searching for
Qt packages when using 3.20.0 and later. However, this fails if we're
using CMake 3.9.6 or earlier. Set CMAKE_AUTO* where needed depending on
our CMake version.

Ping #17314.
2021-03-31 20:02:18 +00:00
Gerald Combs be2b0fc810 CMake: Enable AUTO{MOC,UIC,RCC} earlier.
Enable CMAKE_AUTOMOC, CMAKE_AUTOUIC, and CMAKE_AUTORCC before searching
for Qt packages. This is apparently required for CMake 3.20.0 and later.
Fixes #17314.
2021-03-26 20:48:22 +00:00
Jirka Novak ce786ed265 Rtp player: It is possible to select multiple rows in stream's list and graph
Changes:
- It is possible to select multiple streams in list and in graph
- Select All/None/Invert implemented in list of streams and in graph
- Indication of "Selected" stream redesigned in graph
- Mouse hovering shows related row/wave
- All operations adapted to multiselection
2021-03-09 16:49:09 +00:00
Gerald Combs 4fd5224ecf CMake: Use target_include_directores more.
The include_directories documentation at
https://cmake.org/cmake/help/latest/command/include_directories.html
says:

"Note: Prefer the target_include_directories() command to add include
 directories to individual targets and optionally propagate/export them
 to dependents."

Switch from include_directories to target_include_directories in a bunch
of places.

Add "SYSTEM" to the remaining external include_directories calls in
order to minimize our compiler warning blast radius.
2021-02-18 06:34:46 +00:00
Gerald Combs 270c8ed746 CMake: Make sure system headers are treated as such.
Use target_include_directories instead of include_directories in a few
places as recommended at

https://cmake.org/cmake/help/latest/command/include_directories.html

Doing so lets us mark a bunch of dependency includes SYSTEM PRIVATE, in
particular LIBXML2_INCLUDE_DIRS. On macOS this keeps us from triggering
the nullability warnings described at

https://www.wireshark.org/lists/wireshark-dev/202004/msg00056.html

(This might also keep the Visual Studio code analyzer from complaining
about various Qt headers, but I haven't tested this.)
2021-02-15 08:31:08 +00:00
Jirka Novak 7e063b6070 RTP Player dialog improved
Functional changes:
  Audio routing information is now stored in audio stream and not in table. It
is handled by separate utils/rtp_audio_routing.cpp class which is able to
convert it between mono/stereo etc.
  There is new utils/rtp_audio_routing_filter.cpp class which is able to
route mono audio stream to any audio channel.
  Sample file separated from audio stream file - sample file is generated only
during recap. So when we need new waveform, we just use existing sample file
and no recap required - it is much faster.
  Audio stream exports just mono audio. Mono audio is then expanded to stereo
and correct channel by AudioRoutingFilter during play as required. So when
audio routing is changed, no recap and no audio export is required.
  When audio stream is muted, no audio is produced nor played.
  Most of signals between RtpPlayerDialog and RtpAudioStream were removed.
Start/Pause/Stop is processed in RtpPlayDialog (just for non muted streams).
Play possition is not received from every playing stream but from independent
silence stream.
  Added Mute/Unmute function.

Optimalization:
  When audio routing is changed, just graphs are updated. No retap nor audio
decoding is required.
  When TOD is changed, just graphs are updated. No retap nor audio decoding is
required.
2021-02-09 18:10:14 +00:00
Gerald Combs 7ab6440416 Tools: Clean up checkAPI and add ui/qt.
Remove the --check-addtext and --build flags. They were used for
checkAddTextCalls, which was removed in e2735ecfdd.

Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in
main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp.

Rename "index"es in packet-usb-hid.c.
2020-09-05 07:41:29 +00:00
Guy Harris d5fe2d494c wsutil: define HAVE_LIBGCRYPT_AEAD in wsutil/wsgcrypt.h.
It's used in a number of source files; don't force each of them to test
GCRYPT_VERSION_NUMBER independently.

Make sure every file that uses HAVE_LIBGCRYPT_AEAD includes
wsutil/wsgcrypt.h.

Also do some other definitions that are based on the libgcrypt version
there as well.

This requires that the Qt UI code be given the include directory for
libgcrypt, as the follow stream code includes
epan/dissectors/packet-quic.h, which includes wsutil/wsgcrypt.h to get
HAVE_LIBGCRYPT_AEAD defined, and wsutil/wsgcrypt.h includes <gcrypt.h>.

Change-Id: I9cb50f411f5b2b6b9e28a38bfd901f4a66d9cc8f
Reviewed-on: https://code.wireshark.org/review/38116
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-08-11 02:30:04 +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
Guy Harris 464d5688cc Don't build code to handle capturing if we don't have pcap.
Only build the capture information dialog if we're going to support
capturing; otherwise, that dialog never pops up.

Don't include ui/capture.h in ui/qt/wireshark_application.cpp if we
don't have pcap, either; it's not needed, and breaks compilation.

Change-Id: If9a52239fd2c81c37663be8044ecd67f4569d61b
Reviewed-on: https://code.wireshark.org/review/36585
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-03-26 08:33:50 +00:00
Gerald Combs d832145366 Qt: Add Spanish (es) translation assets.
Add an initial "es" Qt translation file and an accompanying flag image.
The image came from

https://en.wikipedia.org/wiki/File:Flag_of_Spain.svg

and is in the public domain.

(We already had a debian/po/es.po.)

Change-Id: I5378ad2cbffb2267389fc8ae6af6d591071e0144
Reviewed-on: https://code.wireshark.org/review/35620
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-03 08:27:21 +00:00
Peter Wu 5cfd8bca95 CMake: fix CMake 3.16 warning about CMP0071
Prevent a file from being processed by moc/uic as it is not needed. This
addresses a new CMake warning "Policy CMP0071 is not set: Let AUTOMOC
and AUTOUIC process GENERATED files."

Change-Id: I8ed458099cdf29472dad29168786cf16b95595fa
Reviewed-on: https://code.wireshark.org/review/35468
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-17 00:10:26 +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
Roland Knall 2cccb26bc4 Qt: Implement FilterListModel
Change-Id: I365281a709ded644fc8d6ccfce5870a000221a3b
Reviewed-on: https://code.wireshark.org/review/34856
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-28 15:08:06 +00:00
Roland Knall 6820e3515a Qt: Fix Column Preferences
The current implementation has some serious bugs. e.g. if an added
column is moved, existing columns disappear. Also, if new columns
are being added, existing columns may disappear. This moves the column
preferences to a Movel/View concept and implements necessary checks
to ensure, that such an issue cannot occur

Change-Id: I73810812180e2fbed4d2fe67316f190aba82c719
Reviewed-on: https://code.wireshark.org/review/34819
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-20 22:20:38 +00:00
Roland Knall 743f8598cd Qt: Rework Resolved Addresses dialog
This is a refactoring/redesign of the "Resolved Addresses" dialog,
allowing for sorting/filtering and searching within the addresses
and ports.

Change-Id: I5071e92ff699323b6c93fc533eeaf92e0db334de
Reviewed-on: https://code.wireshark.org/review/34398
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-01 09:02:51 +00:00
Roland Knall a9fc3681f6 Qt: Move CopyFrom from menu to button
Move the CopyFromProfile implementation from a menu to a button
to ease integration in existing code

Change-Id: I4fb4e952e89665eda99d162e891ac6d3516a6f02
Reviewed-on: https://code.wireshark.org/review/34266
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-08-26 06:34:31 +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 8dcde280c2 CMake: Use tab for indentation
Change-Id: I9d08443169f6b0b87c37ff20babffee1e6769ae7
Reviewed-on: https://code.wireshark.org/review/34009
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-07-18 20:37:36 +00:00
Roland Knall 390071ed0b Qt: Import Profile information
Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17 18:25:11 +00:00
Roland Knall 4e7ac431a5 Qt: Move Profile Dialog to Model/View
Move the profile dialog to a model/view based concept. Display and
ordering works now, but nothing much else.

Add possibility to filter for profiles, as well as group filters.

Change-Id: I4740ad5aa10feeb31192f8131fb1204f5dca7232
Reviewed-on: https://code.wireshark.org/review/25141
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-11 04:49:02 +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
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 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
João Valverde 4c5d2f5ccf CMake: Add libpcap imported library target
Change-Id: I5326b87784817fb353329e2d686fe0515c32f6cb
Reviewed-on: https://code.wireshark.org/review/33038
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-03 21:56:45 +00:00
João Valverde 186f985793 CMake: Check for and use system SpeexDSP library
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25
Reviewed-on: https://code.wireshark.org/review/31857
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-02 21:12:01 +00:00
Peter Wu ec8f506c4b Qt: add initial RSA Keys preference frame
The RSA Keys frame is intended to configure RSA keys (both key files and
PKCS #11 tokens). Add a new "RSA Keys" item to the preferences menu.
Implement addition and removal of PKCS #11 libraries and add an initial
version that displays configured RSA keys.

The "Add new token…" button will be implemented later.

Change-Id: Ie5b9eb403afc7bebeb7be8bd53d4d4b30842204c
Reviewed-on: https://code.wireshark.org/review/31795
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-29 23:34:01 +00:00
João Valverde a3991874eb CMake: Replace PACKAGELIST magic
This is more explicit and easier to read with slightly better locality
while using less code.

Also less awkward when the package doesn't fit the narrow package list
expectations.

The ws_find_package() macro doesn't include all the status messages. The
choice was to rely on standard find_package() and feature_summary() output
and be less verbose.

Avoid polluting the CLI build interface. Per target include paths and
macro definitions are preferred.

Because this patch intentionally removes the global CMAKE_*_FLAGS
and include_directories() usage in favor of target properties, some
untested build configurations may inadvertently break because of
missing ${PACKAGE}_INCLUDE_DIRS or ${PACKAGE}_DEFINITIONS. This
required a manual review of dependencies that might have been
incomplete.

${PACKAGE_VAR}_LINK_FLAGS seems to be unused.

Changing the CMake Qt code to use more modern CMake component syntax
is left as future work.

Change-Id: I3ed75252189a6e05a23ed6e619088f519cd7ed78
Reviewed-on: https://code.wireshark.org/review/31496
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-20 11:50:10 +00:00
Peter Wu 10ef540405 CMake: avoid including file modification time for RCC
Resources such as translations (autogenerated qm files) and SVG images
resulted in non-reproducible builds. Be sure to disable this to make the
resources reproducible on Qt < 5.8 or Qt >= 5.9 (excluding Qt 5.8.x).

With this change, the Wireshark build is reproducible invariant of the
build directory (but not the source directory).

Bug: 15163
Change-Id: I9240d2aa6e7298e1928c0f1d97ce83673320024d
Reviewed-on: https://code.wireshark.org/review/31593
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-18 15:46:37 +00:00
Roland Knall 5b7ea06e0a Qt: IO Graph correct color selection
The correct method of selection of colors is just using the
QColorDialog not a specialized object. Implementing it just
that way, to correct bug on Linux

Bug: 15399
Change-Id: I3c4785d352888ec34c34534667c3f7df182f9fd7
Reviewed-on: https://code.wireshark.org/review/31465
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-01-16 18:40:10 +00:00
Peter Wu 4de0ea38cd CMake: change static qtui library into an object library
Save 800ms and avoids a synchronization point (improves build
parallelism) by directly adding object files to the wireshark binary.

Change-Id: I7d1484c65a26f3f6874474b61d38ba474aba8347
Reviewed-on: https://code.wireshark.org/review/31512
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-12 18:20:52 +00:00
Alexis La Goutte 79c4f0ffbb Qt: Add Ukrainian (uk) translation
No yet available at 100% (35,8%) but work in progress...

Change-Id: I3d0d861037abe5e5f2611f95ac27ad42c8d20c47
Reviewed-on: https://code.wireshark.org/review/31158
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-23 06:49:22 +00:00
Alexis La Goutte 8eb3ef85fe Qt: Add Swedish (sv) translation
No yet available at 100% (57,05%) but work in progress...

Change-Id: I3fa95c49003aa6fd5183d24fe76b721520a44ba0
Reviewed-on: https://code.wireshark.org/review/31157
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-23 06:49:08 +00:00
Alexis La Goutte 3a83a8476a Qt: Add Russian translation
Change-Id: I06044953bbf6040f8a0bb291c2b3e9cbf87c39f4
Reviewed-on: https://code.wireshark.org/review/30869
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-03 04:51:40 +00:00
Stig Bjørlykke 75c370fe54 Qt: Refactor copy from profile widget
Refactor CopyFromProfile class from Button to Menu to make it
usable for existing buttons, both QPushButton and QToolButton.

Change-Id: I7d23b4225dbe45f961fb05e73dbb4dd51e6f8ea1
Reviewed-on: https://code.wireshark.org/review/30083
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-08 21:07:49 +00:00
Stig Bjørlykke 84a0eccebd Qt: Add copy from another profile for colorfilters
Add a new button to the Coloring Rules dialog to copy entries from
another profile, or system defaults. The "copy from profile" button
will also be used for other dialogs.

Add a clear all button to easily remove all existing entries before
importing or copying from another profile.

Change-Id: Ia1e66444731018372b4354164c5a722fd73d403b
Reviewed-on: https://code.wireshark.org/review/30008
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05 12:38:22 +00:00
Roland Knall 3a514caaf1 Qt: Move FilterToolBar to a separate class
Remove all filter toolbar related stuff into a separate class
and away from MainWindow

Change-Id: I36d937be6c2686b16a8d494213dc740d8d28efcb
Reviewed-on: https://code.wireshark.org/review/28432
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-25 22:22:48 +00:00
Gerald Combs f8092f96b3 Qt: Move wireshark-qt.cpp back to ui/qt/main.cpp.
The Qt UI's main module started out as ui/qt/main.cpp but was moved to
the top-level directory in order to appease Autotools. We don't need to
do that any more, so move it back.

Change-Id: Ic5bc0ed5b754e36cc2b9e682f2ca097781233dfd
Reviewed-on: https://code.wireshark.org/review/28090
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-06-08 03:50:22 +00:00
Roland Knall f4e3d8cbf3 Qt: Rename MainWelcome
Currently exist two main pages within Wireshark. The first being
the main welcome page and the second the packet capture page. The
first is called "main_welcome.?" and the second is actually the
master_split_ object defined in main_window.h. The first being a
QFrame, the second not.

In preparation for future developments (dockable windows, multiple capture
files), this is being corrected, with the main welcome being renamed
as welcome_page as a first step

Change-Id: I40703e6ed15ff6f6b62b2a3cf31f5636ac6da9ec
Reviewed-on: https://code.wireshark.org/review/27949
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-01 22:01:20 +00:00
Roland Knall a1a56bd97d Qt: Move Layout and clear master_split use
master_split_ must be moved to a more prominent widget, as it is in actuality
the main widget of the application.

Change-Id: Id45b60f5f57c982c1890318eec9fa87ab61a9e19
Reviewed-on: https://code.wireshark.org/review/27942
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-01 17:01:34 +00:00
Peter Wu 71a240d611 cmake: remove dependency of i18n.qrc on .qm files
The i18n.qrc file is generated at cmake time while the .qm files are
also built as dependency of the AUTORCC process. The extraneous .qm
dependency of i18n.qrc possibly causes duplicate wireshark_zh_CN.qm
builds (see v2.9.0rc0-605-g644939ed9e), so remove it.

Change-Id: I629e7b809486a65b27158f66a7e62cfcf61657d3
Reviewed-on: https://code.wireshark.org/review/27633
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-18 13:25:50 +00:00
Peter Wu a52aacd716 CMake: cleanup ui/qt/CMakeLists.txt
Remove some unused variables, favor list(APPEND X Y) over set(X ${X} Y),
use consistent capitalization and whitespace.

Change-Id: I2a90b55d29899393019a1aee3394b87ab12dda5b
Reviewed-on: https://code.wireshark.org/review/27625
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-18 04:19:58 +00:00
Peter Wu 644939ed9e CMake: try to fix duplicate qm builds on Windows
The Windows buildbot showed that .qm files are generated twice. This
resulted in rebuilding i18n.cpp, which resulted in rebuilding qtui,
which finally resulted in Wireshark.exe being built twice for no reason.

Assuming it is the same issue as commit v2.3.0rc0-3078-gaa9a0b3bf8,
avoid having multiple targets depend on the same output (.qm files).
This patch requires CMake 3.1 or newer.

Change-Id: Iffd8946701553b89c09504278afa4b16d2a0b5b4
Fixes: v2.5.0rc0-1366-gdfa893b1cf ("cmake: set CMAKE_AUTOUIC and CMAKE_AUTORCC to avoid CMP0071 warning")
Reviewed-on: https://code.wireshark.org/review/27620
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-17 19:44:04 +00:00
Gerald Combs 9ec5b2b0fe Qt: Implement the capture info dialog.
Add back the capture info dialog. Draw sparklines for each protocol.
Update the User's Guide.

Bug: 12004
Change-Id: I45be8a0df4752255831a8b139ee84bb34d675ba9
Reviewed-on: https://code.wireshark.org/review/27565
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:26:36 +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
Peter Wu 4c1690ac47 CMake: require at least CMake 3.5
CMake 3.11 with the Ninja generator started complaining about CMP0058
related to ui/qt/CMakeFiles/qtui_autogen.dir/RCCstock_iconsInfo.cmake
amd other files (AUTORCC). While the policy could be set explicitly,
let's try to modernize the CMake configuration:

- Drop CMP0042, if this gives issues with macOS, then it must be solved
  in a different way using non-deprecated methods.
- Drop CMP0054 and ensure that all if("${foo}") and if(${foo}) are
  converted to if(foo).
- Remove string comparison against "-NOTFOUND", it already evaluates to
  false in an if condition.
- Use CXX_STANDARD/CXX_STANDARD_REQUIRED for Qt 5.7 and newer.
- Assume that copy_if_different can accept multiple sources (CMake 3.5).
- Consistency: Out of the 60 CMake 3.11 FindXxx.cmake files that use
  find_library, 34 contain "XXX_LIBRAR" while 16 contain "Xxx_LIBRAR".
  Let's assume uppercase variables (now custom MaxMindDB include dirs
  are correctly used).

CMake 3.5 was chosen as the next version because of its wide support.
Ubuntu 14.04 ships with cmake3 3.5.1, Debian jessie-backports has 3.6.2,
EPEL for CentOS/RHEL6 includes cmake3 3.6.1 and SLES12 SP2 has 3.5.

Change-Id: I2fa7b94bf8cc78411f414987d17bab3a33dfb360
Reviewed-on: https://code.wireshark.org/review/27444
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 10:28:09 +00:00