Commit Graph

5573 Commits

Author SHA1 Message Date
Gerald Combs b443d4646e Qt+Windows: Adjust our DBAR check logic.
Don't bother fetching a file's version if its name doesn't match any of
the DBAR DLL list entries. Otherwise we try to open a bunch of DLLs we
don't care about.

Change-Id: Icab11450839195c1259bb307ae88988f52917487
Reviewed-on: https://code.wireshark.org/review/25973
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-02-22 05:12:03 +00:00
Gerald Combs 205424287b Qt: Improve our capture filter completions.
Use libpcap's pcap-filter.manmisc to create our capture filter
completion list instead of scanner.l.

Bug: 14430
Change-Id: I11f6eb5679dc93561dce62f28149e103ac9b4a2b
Reviewed-on: https://code.wireshark.org/review/25971
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-02-22 05:01:53 +00:00
Guy Harris 62d34fcc2c Squelch some cating-away-constness warnings.
Change-Id: I1ebe9b42957e0db5cc04f44e31f291cb40ba14e1
Reviewed-on: https://code.wireshark.org/review/25960
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-21 08:28:22 +00:00
Guy Harris e788fac9fa Squelch some casting-away-constness warnings.
If we're constructing the string, assign the pointer to it to a
non-const pointer variable, set the stat_tap_ui cli_string member to
that variable, and then use the variable to free it when we're done.

Don't cast away constness if we don't have to.

Change-Id: If3b24dbf1c910e1e6eceb76f2f6a7ae3898315f9
Reviewed-on: https://code.wireshark.org/review/25952
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 22:42:09 +00:00
Guy Harris cb31f56204 Don't cast away constness.
Change-Id: I04cb49a5fe52bc6de66575228b81db1288bd1959
Reviewed-on: https://code.wireshark.org/review/25948
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 22:08:52 +00:00
Guy Harris bc4e15b579 Don't cast away constness.
Change-Id: Ib69274a8bc6092129a7754c8d21aa2e6f160e242
Reviewed-on: https://code.wireshark.org/review/25942
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 20:13:29 +00:00
Guy Harris 95cb454355 Constify an argument, remove no-longer-necessary removal of constness.
Change-Id: Ic0a70b28bfdb57c4c2ddf07cf071a85042672c9e
Reviewed-on: https://code.wireshark.org/review/25941
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 20:06:36 +00:00
Guy Harris b00e7fc088 Constify some method arguments, and don't cast away constness.
Change-Id: I266a724ff672026b3fdf07ac2eb2260f37c04247
Reviewed-on: https://code.wireshark.org/review/25940
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 20:00:59 +00:00
Guy Harris ba7657cb19 Cast away constness at the point where it can't be avoided.
The only reason why we have to cast it away is that C doesn't have a
good framework for creating collections of objects of arbitrary type
(where type includes constness) and we're using a datatype (GHashTable)
implemented and declared in C here.  Do it in the g_hash_table_insert()
call.

Change-Id: Ibd7706255519a97b77e4e4a52fada43e050f2bf0
Reviewed-on: https://code.wireshark.org/review/25938
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 19:52:15 +00:00
Guy Harris 442e06d9c6 Don't gratuitously cast away constness.
Change-Id: I235aacba37e6383d3b369ec0c9b39c9f37db5ff5
Reviewed-on: https://code.wireshark.org/review/25936
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 19:47:45 +00:00
Guy Harris 209f7700b3 Don't cast away constness.
Change-Id: I2b9534e8240e9b0daf4250575f0c17551ee920fd
Reviewed-on: https://code.wireshark.org/review/25935
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 19:44:37 +00:00
Guy Harris 4e857ad20c Type casts without const lose constness.
Don't do

    const foo *x = (foo *)a_const_pointer;

do

    const foo *x = (const foo *)a_const_pointer;

Change-Id: Iee04f71e19fcbe8b8e9a099bad52c8f15577e3e8
Reviewed-on: https://code.wireshark.org/review/25934
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-20 19:38:36 +00:00
Stig Bjørlykke 224215cb42 Qt: Right justify custom columns with multiple fields
Default right justify custom columns with multiple fields
when all fields meet the right-justify criteria.

Include double, float and relative time in the right-justify criteria.

Change-Id: I438eab03e3575ca551cab1a547e4f8f00e4792b2
Reviewed-on: https://code.wireshark.org/review/25919
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-20 11:48:20 +00:00
Stig Bjørlykke 1044d56e3d Qt: Improve sorting of custom columns with multiple fields
Use the already parsed col_custom_fields_ids to loop all
fields in custom columns.

Change-Id: I937e10e087feadc788591f2e3d49568611fda69b
Reviewed-on: https://code.wireshark.org/review/25918
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-20 11:47:40 +00:00
Gerald Combs 042cfea07c Qt: Use QFrames as separators in the filter expression toolbar.
Use QFrames instead of QActions as separators in the filter expression
toolbar. This keeps them from showing up in the overflow menu.

Change-Id: I60f6f0434fe5ba88fe1b4221e9e70640eed840bb
Reviewed-on: https://code.wireshark.org/review/25860
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-19 00:13:14 +00:00
Guy Harris c61b543e97 Get rid of more new_ prefixes for statistics functions and types.
There are no "old" versions of them that we're keeping around.

Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d
Reviewed-on: https://code.wireshark.org/review/25892
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19 00:12:51 +00:00
Jaap Keuter ca7ac05cf0 Fix some source headers, reformat SPDX license lines in comment block.
Change-Id: Ibae6a64a9915003435a3fb17763535a3844143be
Reviewed-on: https://code.wireshark.org/review/25891
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 22:50:37 +00:00
Gerald Combs 632c6261ca [Automatic update for 2018-02-18]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I5b5b729c83aa7017454b7c7d8230415e1834587f
Reviewed-on: https://code.wireshark.org/review/25862
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-18 08:15:54 +00:00
Guy Harris cae52d27d6 Don't gratuitously cast away constness.
Change-Id: I5d953ba2f89d8c65ae62012f32757acc14108f81
Reviewed-on: https://code.wireshark.org/review/25857
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 23:24:39 +00:00
Gerald Combs 1c5d6881de Qt: Another filter expression toolbar layout attempt.
Try hiding and showing the filter expression toolbar in order to update
its layout. This is a bit ham-fisted but seems to be the only way to get
it to work properly after clearing and inserting buttons.

Bug: 14121
Change-Id: Iea851c029c1586abfdb01c639914f6fe97ea29b3
Reviewed-on: https://code.wireshark.org/review/25840
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-17 21:00:06 +00:00
Gerald Combs a9823dddf3 Qt: Replace the toolbar extension icon.
The QToolBar extension button icon is ugly, particularly on HiDPI
displays.  Replace it with a RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK.

Change-Id: I8822252ff5c328acd23aad345313e7cfafdffa47
Reviewed-on: https://code.wireshark.org/review/25821
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-02-17 08:26:46 +00:00
Gerald Combs d0b9db8cd8 Qt: Add separators between filter expression buttons.
I've noticed at SharkFest and other places that people sometimes put
square brackets around their filter expression names so that it's easier
to distinguish one button from another.

Add separators between buttons so that this shouldn't be necessary.

Change-Id: I3b1ca42f6417d2045781fc14d594faba4fd00fd5
Reviewed-on: https://code.wireshark.org/review/25820
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-02-17 08:26:26 +00:00
Guy Harris 459bd4646d Don't have CLEAN_FILES variables for the "clean" source files.
Except for the one directory that (currently) has "not yet clean" files,
epan/dissectors, we don't need a separate variable to keep track of the
"clean" source files.

In the cases where not all files were in CLEAN_FILES, put them into the
variable used to enable -Werror or its equivalent.

Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b
Reviewed-on: https://code.wireshark.org/review/25830
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 02:50:24 +00:00
Guy Harris 5f0d50690a Use -Werror except for explicitly listed dirty dissectors.
Use AM_CFLAGS for everything except for libdirtydissectors in
epan/dissectors.  Rename GENERATED_CFLAGS/GENERATED_CXXFLAGS to
DIRTY_CFLAGS/DIRTY_CXXFLAGS, as it doesn't apply to all generated files.

Change-Id: I702b53e185d6972c08d68ef31c05df7b03669daa
Reviewed-on: https://code.wireshark.org/review/25829
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 01:51:59 +00:00
Guy Harris 4a69d10920 Squelch redundant declaration warnings.
Have the text-to-pcap scanners define a routine that the main code
calls, which both allocates and destroys the scanner.  Don't declare the
Lex-generated routines in a header file we create, declare that routine,
instead.

Change-Id: Icad6a83db1a0dea8ac390315af72383fc99f8513
Reviewed-on: https://code.wireshark.org/review/25822
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 22:40:26 +00:00
Guy Harris 72b57ac4ef Use DIAG_OFF_FLEX/DIAG_ON_FLEX more consistently.
Add warning C4267 (size_t to int conversion) with MSVC to DIAG_OFF_FLEX.

Addd -Wshorten-64-to-32 with Clang and GCC to DIAG_OFF_FLEX.

Don't explicitly use #pragma to turn off warnings; use DIAG_OFF_FLEX for
all of them.

If we use DIAG_OFF_FLEX, use DIAG_ON_FLEX, even if we have no section of
entirely included code at the end.

Change-Id: Ibfd44e8954704e9a8bcb1bd8e54f31d28357fffb
Reviewed-on: https://code.wireshark.org/review/25817
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 19:54:16 +00:00
Guy Harris 8bc1c6e3e8 Add DIAG_OFF_FLEX and DIAG_ON_FLEX for use in Flex scanners.
DIAG_OFF_FLEX turns off all warnings that we want to disable for
Flex-generated code due to some versions of Flex generating code that
triggers those warnings.

DIAG_ON_FLEX restores those warnings, so we do the checks for code that
*we* wrote.

Use them in .l files.

Change-Id: I613a20309a30cd4c61111a1edbe27a5d05fcbf59
Reviewed-on: https://code.wireshark.org/review/25815
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 10:35:10 +00:00
Gerald Combs 08754c3893 Suppress more PortAudio + Win64 compiler warnings.
Add C4311 and C4312 to the suppression list.

Change-Id: I90c85ee5cd3f7c3f235ed89b78d04f34bf0db449
Reviewed-on: https://code.wireshark.org/review/25810
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-15 23:31:32 +00:00
Peter Wu 9198448f9d Qt: fix crash in packet dialog on changing selection
"((capture_file_t *)cap_file_)->edt" is documented in cfile.h to cover
the currently selected packet (in the packet list). But in the packet
dialog, the packet selection is irrelevant and the data from a different
dissection tree must be used.

Change-Id: Ieaea3cf862d47540e7f6b6c84c1a2fa6945a877b
Fixes: v2.5.0rc0-1532-g56a130a152 ("ByteViewText: Remove epan dependancy")
Bug: 14246
Reviewed-on: https://code.wireshark.org/review/25437
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-14 08:03:10 +00:00
Michael Mann f0db412f57 Convert coloring rules dialog to use model.
Change-Id: I12a465b5451bdbaea871828329d48fda3627fca3
Reviewed-on: https://code.wireshark.org/review/25372
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-14 07:45:47 +00:00
Gerald Combs 3084125696 Qt: Fix the filter expression toolbar layout.
Take a hint from the QToolButton sources and update the filter
expression toolbar using updateGeometry instead of adjustSize. This
appears to do the layout updates and other changes required to draw the
dropdown in the correct place.

Bug: 14121
Change-Id: I45d5a1173703f9c16d89841a57f651935da43d92
Reviewed-on: https://code.wireshark.org/review/25784
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-02-14 05:32:50 +00:00
Gerald Combs 9cc4a3b967 CMake: Install the HTML guides.
Add a "FileInstall.cmake" module that installs files and directories.
Use it to install the chunked HTML guides.

Install the guides into CMAKE_INSTALL_FULL_DOCDIR. By default this is
/usr/local/share/doc/Wireshark. Define DOC_DIR to match.

Add explicit file and directory permissions to the default install
targets.

Remove the PDF install target.

Bug: 14258
Change-Id: I4712a4047a54627b7520b5bf5f191e0761d19606
Reviewed-on: https://code.wireshark.org/review/25737
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-02-13 06:18:34 +00:00
Michael Mann 04df34909f ModelHelperTreeItem: Rename appendChild -> prependChild
The function was actually calling QList<QVariant>.prepend underneath
and some users of the class may need "append" to mean "append".
prepend() is faster, but current users are sorting all lists anyway.

Change-Id: I65cb02f4a2d1960cc2c49034963b191156789cc9
Reviewed-on: https://code.wireshark.org/review/25730
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-11 16:56:07 +00:00
Gerald Combs fa258523a9 [Automatic update for 2018-02-11]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I1d8d8ecda65cb10240b7897399b32fb2c173003f
Reviewed-on: https://code.wireshark.org/review/25727
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-11 10:27:15 +00:00
Guy Harris 0b649a0910 Separately count all records and data records.
A file might contain only metadata records, which exist only to provide
information needed to interpret data records; no point in showing them
in record counts.

Put the counts into the structure that we fill in, and rename the
structure and the routine to reflect that it determines statistics other
than just times.

Speak of data records rather than packets; the file might be full of
Sysdig event records but not have any packets in it, for example.

Change-Id: I8553181dca4129736bdae2c0cbba92becc28d6ef
Reviewed-on: https://code.wireshark.org/review/25722
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-10 03:44:10 +00:00
Guy Harris 9797f34074 Move the merge_action_e enum to the Win32 file dialog source file.
It's only used with the Windows dialog, so no need to make it public.

Change-Id: I4976748d642399b57abc89bccc26f680e3938509
Reviewed-on: https://code.wireshark.org/review/25719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 20:43:35 +00:00
Guy Harris 794596d936 Fix indentation.
Change-Id: I7f19b35032a686dfb2f776e8ff3527366b008331
Reviewed-on: https://code.wireshark.org/review/25718
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 20:36:43 +00:00
Guy Harris 25d90cb13c Put the preview-generation loop into a common routine.
Don't have all the file open dialogs have their own copies.

Change-Id: Icd6f2fd44b081575e6481a134027c90046938c64
Reviewed-on: https://code.wireshark.org/review/25717
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 20:29:08 +00:00
AndersBroman 99e645bfdb Do changes from Generalize wtap_pkthdr into a structure for packet and
non-packet records for file_dlg_win32.c

Change-Id: I34ce10e574036b2d857675008c7109d5e38be6e7
Reviewed-on: https://code.wireshark.org/review/25710
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-09 11:09:31 +00:00
Martin Mathieson bd41b8e417 RLC graph: fix zooming, both in normal case and when graph direction has been switched
Change-Id: I05e02b2821367ef1a78b9ededd462324053cf06e
Reviewed-on: https://code.wireshark.org/review/25683
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09 05:30:55 +00:00
Guy Harris 1f5f63f8ef Generalize wtap_pkthdr into a structure for packet and non-packet records.
Separate the stuff that any record could have from the stuff that only
particular record types have; put the latter into a union, and put all
that into a wtap_rec structure.

Add some record-type checks as necessary.

Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2
Reviewed-on: https://code.wireshark.org/review/25696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 00:29:51 +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
Guy Harris 0f721985f1 Get rid of unneeded #includes.
Change-Id: Ica457e3fb2a6e2318ca1e03fb7b2569c7d8e6aba
Reviewed-on: https://code.wireshark.org/review/25679
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08 03:31:04 +00:00
Gerald Combs 62fc862bc6 Squelch an rc warning.
Don't include glib if RC_INVOKED is defined so that the Microsoft Windows
Resource Compiler doesn't generate the following complaint:

\path\to\glib/gatomic.h(87): warning RC4011: identifier truncated to '__GCC_HAVE_SYNC_COMPARE_AND_SWA'

Change-Id: I6637aee2842de4e7041b66ff4428f617478efcb4
Reviewed-on: https://code.wireshark.org/review/25670
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-07 22:12:32 +00:00
Guy Harris 7ee8ead85c Include as "ui/summary.h", as is done elsewhere.
Change-Id: I832c74554854bf380984cab83a53e7ffe165ad84
Reviewed-on: https://code.wireshark.org/review/25658
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07 09:12:10 +00:00
Guy Harris 40a533abe1 Move summary.[ch] to libui.
Change-Id: I49f1eeb4fc3a90e436da116577a7d0c5ba982eee
Reviewed-on: https://code.wireshark.org/review/25657
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07 08:29:52 +00:00
Moshe Kaplan cd8c73a355 Generate HTTP Referer statistics
The main benefit of this feature is that it enables users to see the 
succession of HTTP requests that led to a specific request.

A sample PCAP is available here:
https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16085

Change-Id: I7c521315b848fbce659fdc01e43f261d804a3a48
Reviewed-on: https://code.wireshark.org/review/25319
Reviewed-by: Moshe Kaplan <me@moshekaplan.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-07 05:37:51 +00:00
Guy Harris f29bafff46 Don't assume all packets have time stamps.
We explicitly allow the not to, and, for example, Simple Packet Blocks
in pcapng files don't have time stamps.

Change-Id: If1db5747c9e06faa7550162df8e04dc60b71d954
Reviewed-on: https://code.wireshark.org/review/25650
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07 03:10:34 +00:00
Alexis La Goutte e6c0f03a42 about_dialog (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ib7c673980909551d9f817d60bbe2d77ed180b661
Reviewed-on: https://code.wireshark.org/review/25599
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-06 13:56:17 +00:00
Gerald Combs ab202adb0a Proto tree: Update left arrow navigation behavior.
If the user presses the left arrow when a non-expaned proto tree item is
selected, jump to its parent item as described in the "Main Window
Navigation" section of the User's Guide..

Change-Id: Ie7478a2c292df9a225555f5539d7ba90ab5e132d
Reviewed-on: https://code.wireshark.org/review/25623
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>
2018-02-06 07:19:09 +00:00
Guy Harris 5fcf5b9cc3 Don't assume all packets have time stamps.
We explicitly allow the not to, and, for example, Simple Packet Blocks
in pcapng files don't have time stamps.

Change-Id: I6c8921cf092de7831d0a3d6dab8467388f4e6286
Reviewed-on: https://code.wireshark.org/review/25625
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-06 04:25:06 +00:00
Gerald Combs 1d999dea5c Qt: Update recent status via a non-blocking connection.
Connect our recent file status signal using a Qt::QueuedConnection
instead of a Qt::BlockingQueuedConnection. As described at
https://woboq.com/blog/how-qt-signals-slots-work-part3-queuedconnection.html,
QueuedConnection makes a copy of the argument list while
BlockingQueuedConnection passess the list directly.

This fixes what appears to be a false positive reported by
ThreadSanitizer. Cross-thread signals are protected by a QMutex, but
qmutex_mac.cpp in the Qt5 sources uses a Mach semaphore. The
ThreadSanitizer manual says it supports pthread mutexes and compiler
atomic operations but doesn't mention Mach semaphores.

Change-Id: Icb8a63d7d0bdfe985ab8274757043ef45ae4bcde
Reviewed-on: https://code.wireshark.org/review/25576
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-05 05:10:10 +00:00
Gerald Combs ffc200ade3 [Automatic update for 2018-02-04]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I66df4a62ae7fb7c986130fec01359ebb7b00d71f
Reviewed-on: https://code.wireshark.org/review/25590
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-04 08:14:37 +00:00
Gerald Combs a4bb6c2d39 Make a deep copy of our filename in RecentFileStatus.
QStrings are implictly shared as described at
http://doc.qt.io/qt-5/implicit-sharing.html. This is normally useful,
but RecentFileStatus is passed a QString before it does its work in a
separate thread.

Make a deep copy of the filename in order to ensure local ownership and
to avoid having to fool around with a QMutex (which might not be
recognized by ThreadSanitizer[1] or Helgrind[2]).

Remove getFilename since it was unused.

[1] https://github.com/google/sanitizers/issues/460
[2] http://valgrind.org/docs/manual/hg-manual.html

Change-Id: I5b5c329505ed8c02d30043a2a6d1ded625924b9f
Reviewed-on: https://code.wireshark.org/review/25572
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-03 02:06:49 +00:00
Stig Bjørlykke d8565d8f1b Qt: Keep auto-scroll when starting a new capture
Avoid turning off actionGoAutoScroll when going to the first packet
when starting a new capture.

Bug: 14257
Change-Id: I676139696cf4917b779c5fd390d7a22fb373a6b5
Reviewed-on: https://code.wireshark.org/review/25568
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-02 18:38:11 +00:00
Stig Bjørlykke 8604242e8f Qt: Avoid divide-by-zero if missing AUTHORS file
When debugging with at least Xcode the AUTHORS file is missing,
so ensure we don't divide by zero when this happens.

Change-Id: Idd7cdf8137998c872f80108662fbb8a133110af2
Reviewed-on: https://code.wireshark.org/review/25567
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:42:06 +00:00
Dario Lombardo 819b8174a9 cli: use SPDX identifiers.
Change-Id: I7ce9b2a32f4ddad93ca1d9697c2a76b067f9e5f7
Reviewed-on: https://code.wireshark.org/review/25564
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:40:28 +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 e5f4ef0c42 ui: use SPDX identifiers.
Change-Id: I6b05399395bcc35e59b73b4030ba4a05711a7b1a
Reviewed-on: https://code.wireshark.org/review/25565
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:39:04 +00:00
Stig Bjørlykke c55974facc Qt: Add a missing HAVE_LUA guard
Change-Id: I0ee67e769c2c9030da1844a6631dac9a494d0f06
Reviewed-on: https://code.wireshark.org/review/25556
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-02 09:36:47 +00:00
Dario Lombardo 6c13f7070c Qt: add initializers in PacketDialog() (CID: 1427679).
Change-Id: Id2f16d849b85275308101f49a5ea22fbddf66f3b
Reviewed-on: https://code.wireshark.org/review/25411
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-02-02 05:29:42 +00:00
Stig Bjørlykke 8bf837eddc Qt: Always update splash screen on action change
On a "fast" computer this is needed to find any action which is
taking long time during startup. Without this the splash screen
may show a random action message happening before the slow action.

Also optimize splashUpdate() when nothing to update.

Change-Id: I0946353dbcf12e78323361f2cb4410c6c5605d76
Reviewed-on: https://code.wireshark.org/review/25552
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-02 00:17:53 +00:00
Gerald Combs 142c03516e Qt: Show Lua scripts as links in the about box.
Add UrlLinkDelegate::setColCheck, which lets you render strings as URLs
or plain text according to a regex. Use it to show Lua scripts as URLs
in the about box.

Open links on double clicks and add column checks.

Change-Id: Iaf5cd8a46a0b66a7d45079ba045ed2bbcb0ed005
Reviewed-on: https://code.wireshark.org/review/25542
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-01 18:11:22 +00:00
Gerald Combs d4b5943ba8 Qt: Always show the Plugins tab in the about box.
Always show the Plugins tab. We probably have plugins via extcap even if
Lua and dissector plugins are disabled. Tell the user if we don't find
any plugins.

Change-Id: I7ab1fb302298232a847193754b53688620855959
Reviewed-on: https://code.wireshark.org/review/25543
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-01 16:55:03 +00:00
Gerald Combs c84b0aeead Qt: More byte view and proto tree fixes.
47e1798762 broke byte view highlighting when selecting a proto tree
item. Switch back to emitting fieldSelected from selectionChanged. Force
a new selection in selectedFieldChanged, which does what we were trying
to do in 47e1798762.

Clear our marked byte offset in the byte view when we mark a field. Emit
byteSelected whenever we click the mouse.

Don't highlight anything when a tree item is deselected. Deselect a tree
item if we click on something that's not a byte in the byte view.

Change-Id: Ibf419ccb005d69f733b2fe12ce674e1fe504bb96
Reviewed-on: https://code.wireshark.org/review/25541
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-02-01 14:04:25 +00:00
Gerald Combs 0c7bbc7536 Qt: Avoid a potentially large memdup.
Use QByteArray::fromRawData + tvb_get_ptr to create our ByteViewText
data instead of tvb_memdup. If our tvb lifetime is shorter than our
ByteViewText lifetime then that's a bug.

Change-Id: Iede275578a1493b8658308e0778f7f0799d6c6cd
Reviewed-on: https://code.wireshark.org/review/25534
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-01 02:05:06 +00:00
Pascal Quantin 210db80a54 Qt: fix compilation when building without Lua
Change-Id: Idb5d1016637c5d8968eae533d7688099edbeae3a
Reviewed-on: https://code.wireshark.org/review/25525
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-01-31 12:20:18 +00:00
Gerald Combs f5a8711ef1 Qt: About dialog updates.
Open lua scripts when double-clicked. Behavior depends on your system
configuration. Add tooltips accordingly.

Let Qt wrap the "Wireshark" tab information.

Set column widths by eyeballing their contents.

Elide the Folders and Plugins strings in the middle.

Fixup placeholder text capitalization.

Draw links using the palette link color.

Change-Id: Ic141eae05541480ec1e254c55fd81728d04713d9
Reviewed-on: https://code.wireshark.org/review/25510
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-01-31 04:55:37 +00:00
Gerald Combs 47e1798762 Qt: Byte view and proto tree fixes.
Select our byte field only when we enter marked / locked mode.

Emit fieldSelected from autoScrollTo so that we always set the marked
protocol.

Don't clobber the current index in saveSelectedField.

Change-Id: I967b20608f991a5f3e6a0979b1f702f874ce27b4
Reviewed-on: https://code.wireshark.org/review/25521
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-01-31 04:54:36 +00:00
Stig Bjørlykke 55e74ba841 Qt: Write recent before applying profile changes
The selected profile may be renamed in apply_profile_changes()
so write the recent file before renaming the directory to ensure that
we reload the latest changes.

Change-Id: I8988a00647926d93b0a1903090aadc8c61f1a34e
Reviewed-on: https://code.wireshark.org/review/25516
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-31 04:53:39 +00:00
Stig Bjørlykke 043b45e840 UI: Rename profiles without delete
Do not try to delete the old profile name after renaming.  In most
cases it will not exist, but when using a case-insensitive file system
this will delete the renamed profile if only changing capitalizations
(first it's renamed and then it's deleted).

Change-Id: I27d2d22d2353b09f2041d82ea1cf1bae37a1ce3d
Reviewed-on: https://code.wireshark.org/review/25515
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-31 04:53:12 +00:00
Gerald Combs eda5c950b6 IO Graph: Add some vector checks.
Use Qvector::value in a few places instead of an array index.

Change-Id: I821ef4b16df919977739c12ccaa3b9c3d53f049c
Ping-bug: 14357
Reviewed-on: https://code.wireshark.org/review/25511
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-01-31 04:52:37 +00:00
Jaap Keuter 18f16c8b93 Qt: Fix crash when no plugins are configured
Configuring Wireshark with Cmake using -DENABLE_LUA:BOOL=OFF and
-DENABLE_PLUGINS:BOOL=OFF causes all plugin support to be removed.
The about Wireshark dialog wasn't made aware of that trying to
manipulate the related mdoel anyway, causing a crash.
Make the compilation of the offending code conditional.

Change-Id: Ifa51f40fda7f019d09327dc5650e5a55da2daf2a
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25517
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-30 20:55:47 +00:00
Gerald Combs 461fb517d1 Qt: Check for a valid capture file in the status bar.
Rearrange the logic in showCaptureStatistics. Fixes a crash here when
capturing from stdin.

Change-Id: I7ec15a556579afe968a06a36d7914aa1631666df
Reviewed-on: https://code.wireshark.org/review/25507
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-01-30 17:17:19 +00:00
Gerald Combs 9d87994b67 Byte view: Mark bytes using an outline.
Distinguish between hovered and marked bytes using a lighter and heavier
outline. Remove the "mark" color definitions.

Change-Id: Icf6363e920a634574b7a42a10ea77b538ce78290
Reviewed-on: https://code.wireshark.org/review/25513
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-30 08:39:04 +00:00
Dario Lombardo bc36e2a113 cli: free memory on exit in tap-comparestat (found by clang).
Change-Id: Ie4dfc68583fa6fc742baeaf9d9fd1c7d2f783f38
Reviewed-on: https://code.wireshark.org/review/25435
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-29 00:04:13 +00:00
Gerald Combs 10b9472659 [Automatic update for 2018-01-28]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I0b47c83ca6e62a24043fb5d546141e3e9af1e7b8
Reviewed-on: https://code.wireshark.org/review/25493
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-28 08:18:37 +00:00
Gerald Combs 557f6a4aed Qt: Translate some about box strings.
Change-Id: I2f9d1be83a26129e1206f32133b5ba6705f4dd85
Reviewed-on: https://code.wireshark.org/review/25471
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-01-27 08:29:27 +00:00
Stig Bjørlykke 98d1069066 Qt: Allow filter with deprecated syntax as button
Also update widgets at startup.

Bug: 14369
Change-Id: I2621b78289620a131bcad21d5ec23b048e4b218c
Reviewed-on: https://code.wireshark.org/review/25475
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-26 09:09:11 +00:00
Stig Bjørlykke 4762b78e45 Qt: Remove unused label_folders
Change-Id: I42d7ba0eed9cf2ad50e02a5385c6929e9b31882b
Reviewed-on: https://code.wireshark.org/review/25473
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-26 05:26:26 +00:00
Peter Wu 4398a92be2 Qt: Simplify files column in about dialog
HTMLTextDelegate fails to build in Qt 4.8, partially because
QStyleOptionViewItem.text is introduced with Qt 5. Another issue with
the current implementation is that the "Copy" action includes the HTML
tags for italics. To fix these, just remove the italics formatting.

Change-Id: I63aed7c3d0da3d9829d410d75fc18daa4049c0ca
Fixes: v2.5.0rc0-1822-g73c01d6d05 ("Qt: Rewrite the About dialog to use models")
Reviewed-on: https://code.wireshark.org/review/25470
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-01-26 05:25:57 +00:00
Peter Wu 9be01dc616 Qt 4.8 compatibility fixes
Add missing include headers, define Q_NULLPTR for all Qt objects (to
avoid having to include an ugly compat header), use old signal/slot
syntax (Q_SIGNALS are protected in Qt 4.8), disable Qt 5 log message
handler, etc.

Change-Id: I449beb0b74050fdfb0fc5828d8fb74eedb2b45bf
Reviewed-on: https://code.wireshark.org/review/25469
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-25 17:17:13 +00:00
Gerald Combs 350ca99d17 Qt: Adjust the about box layout.
Make sure the compile and build information is centered.

Change-Id: I2bfe502df4339c28d8c88553419b7d4d412a2be2
Reviewed-on: https://code.wireshark.org/review/25461
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-01-25 09:05:07 +00:00
Alexis La Goutte ccd2b53f40 byte_view_text (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ibfaac5e1d8cc30d6bb8917d0c0e10a79e059a53e
Reviewed-on: https://code.wireshark.org/review/25452
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-24 16:48:18 +00:00
Jakub Zawadzki 0d584d9fed ui: don't g_assert() in get_args_as_string(), but return empty string for no arguments case.
Rework e861a11210 by returning empty string.
g_assert() seems to be not understand by clang scan.

Change-Id: Iade2d81aa22eecf563a465cb86e694e3e0f853df
Reviewed-on: https://code.wireshark.org/review/25441
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-24 11:46:27 +00:00
Jakub Zawadzki 3a9da2e707 gtk: fix memory leak in profile dialog.
fill_list() don't break the loop when it founds first profile matching
name, and it can memleak if somehow it found more than one.
Don't break the loop to avoid regressions. Just g_free() previously found.
Found by clang.

Change-Id: I082b3f1d16f07580a6d7c814d2a8ee5463a44b0f
Reviewed-on: https://code.wireshark.org/review/25422
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22 20:53:54 +00:00
Jakub Zawadzki e6eb4815cd gtk: Fix memory error/double free.
pathname is freed by caller of firewall_save_as_ok_cb(). Make pathname const.
Found by clang scan.

Change-Id: I3a0ab85494a9194edb825bae33eca979c7f8faf3
Reviewed-on: https://code.wireshark.org/review/25417
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22 20:19:57 +00:00
Jakub Zawadzki 862c881318 traffic table: Fix memory leak
Free tpl_line in error path.
Founded by clang scan.

Change-Id: Iaaaaed155d859171ee880d520c11594b2d4d0b59
Reviewed-on: https://code.wireshark.org/review/25420
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22 19:51:59 +00:00
Jakub Zawadzki 6e31943cd4 gtk: Fix memory leak.
free buffer in error path.
Found by clang scan.

Change-Id: I7c271b74e3e5ac9d4f2a550f3c83988a4594133d
Reviewed-on: https://code.wireshark.org/review/25416
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22 19:22:41 +00:00
Jakub Zawadzki 257e7d19fd gtk: fix multiple memory leaks in prefs_capture
All leaks follow the same pattern if not gtk_tree_model_get_iter_first(),
than memory allocated was not used/ freed.
Put memory allocation under gtk_tree_model_get_iter_first() block.
Found by clang scan.

Change-Id: I8f9671ae5fb043343ab5dcdc39a57f1d28fec15b
Reviewed-on: https://code.wireshark.org/review/25418
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-01-22 18:52:49 +00:00
Dario Lombardo 4d639b6f0e tap-httpstat: cast memory instead of reallocate it in glib hash table.
Change-Id: I74db1247f15bdd12fb3ef7fa258d0018605caa30
Reviewed-on: https://code.wireshark.org/review/25346
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-22 04:58:40 +00:00
Gerald Combs 00a528f123 Qt: Translate files in subdirectories.
Make sure we pass ui/qt/*/*.{cpp,h} to lupdate. Make update-tx a
bash script and make sure it passes ShellCheck. Add a -n flag, which
disables pushing back to Transifex.

Change-Id: Ia7d6564bbdbf69285f1f9b88cde09e37da4f916c
Reviewed-on: https://code.wireshark.org/review/25382
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-01-21 20:16:58 +00:00
Gerald Combs 145e3a5dc3 Qt: Proto tree fixes
Make sure ProtoTree::toString stops at the right place.

Don't emit fieldSelected when we're processing a context menu event. It
doesn't appear to be needed and it triggers unwanted automatic scrolling
when prefs.gui_auto_scroll_on_expand is enabled.

Change-Id: I351a6974d07aea6fdd3eb0b5c1975a1b8d8eb7da
Reviewed-on: https://code.wireshark.org/review/25396
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-01-21 14:20:32 +00:00
Gerald Combs 73f5afb75f Qt: Implement ProtoTreeModel::flags.
QTreeView checks to see if Qt::ItemNeverHasChildren is set in various
places, particularly when updating its set of expanded items. Implement
ProtoTreeModel::flags and set Qt::ItemNeverHasChildren when needed so
that QTreeView won't mark a leaf node expanded. Otherwise
ProtoTree::isExpanded will return true when it shouldn't and break the
iterator in ProtoTree::toString.

Bug: 14355
Change-Id: Id89be9911aa14dbbb52725f7203ac26a747c42fc
Reviewed-on: https://code.wireshark.org/review/25376
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-01-21 14:20:17 +00:00
Gerald Combs 3efcc9bd53 Qt: Create byte views at the proper zoom level.
Add a zoomed argument to WiresharkApplication::monospaceFont so that we
can easily fetch the font at its current zoom level. Set the zoomed font
when we create new ByteViewTexts.

Change-Id: I1293f206e37bb798247b1ac4b314fdfe88d4c55c
Reviewed-on: https://code.wireshark.org/review/25371
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-01-21 14:19:10 +00:00
Gerald Combs 47351fb617 Qt: Initialize a struct (found by Coverity)
CID: 1427679
Change-Id: I2ed276f0da413b4853b7dc9ccde3530e655ad760
Reviewed-on: https://code.wireshark.org/review/25403
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-21 13:12:42 +00:00
Gerald Combs 5242dd48b4 [Automatic update for 2018-01-21]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I60c7bef36988fd487d9088880b1d27818723f0b7
Reviewed-on: https://code.wireshark.org/review/25404
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-21 08:18:44 +00:00
Gerald Combs 655892c0a6 Qt: Force integer font metrics in the byte view.
Force the layout engine to use integer arithmetic so that we don't run
into wierd rounding artifacts.

Include the leading when applying formats.

Restrict the hover line width to either 0.5 or 1 logical pixels.

Change-Id: Icc992e085e96e328ed4ed247271f75ddd69637bc
Reviewed-on: https://code.wireshark.org/review/25381
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-19 19:22:12 +00:00
Dario Lombardo 804c4b1653 Qt: add sanity check in InterfaceTreeCacheModel (found by clang).
Change-Id: I8f73254d8ac4b560937431b592a81ad726ce43a9
Reviewed-on: https://code.wireshark.org/review/25370
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-19 16:45:27 +00:00
Dario Lombardo 24cd7a9a1f Qt: remove leak from PathChooserDelegate (found by clang).
Change-Id: I71d73c8464450f8cbc655f8f99f54bd34eddd344
Reviewed-on: https://code.wireshark.org/review/25374
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-01-19 14:53:17 +00:00