Commit Graph

1720 Commits

Author SHA1 Message Date
Gerald Combs 0e8cc9ab0a UDP multicast stream dialog.
Add the UDP multicast stream dialog. Abuse TapParameterDialog a bit more
so that we can edit parameters.

Remove some unused struct members and an unused function.

Change-Id: I962c70344e792f0959527e4bcba8a20bd7e8acf9
Reviewed-on: https://code.wireshark.org/review/10084
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-18 20:17:20 +00:00
Gerald Combs 9a3d4e6eef Move an include guard.
Move an include guard to match our conventions (and make it easier
to spot).

Change-Id: I4bad61a0194219f69217713d051e0ff53ff5a76a
Reviewed-on: https://code.wireshark.org/review/10110
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 20:09:42 +00:00
Alexis La Goutte 2eaaffec33 simple_statistics_dialog(.h): fix parameter 'st_table' not found in the function declaration [-Wdocumentation]
Change-Id: I69814a05fa6ad65315e36fa75ae60634e934be5c
Reviewed-on: https://code.wireshark.org/review/10117
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 20:04:21 +00:00
Stig Bjørlykke 857b1447f8 Qt: Syntax check display filter when fields changed
Change-Id: I7179d7918e7958373806fb9627a36554ab4b9ddc
Reviewed-on: https://code.wireshark.org/review/10115
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-18 19:18:20 +00:00
Stig Bjørlykke 97f3c1b88e Qt: Reload widgets using prefs when reloading Lua plugins
Widgets using prefs must be closed because the prefs may have
been free'd when reloading Lua plugins.

Change-Id: I4b79b7aff18d7923c77a9eb05acadc29b156edbf
Reviewed-on: https://code.wireshark.org/review/10108
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-18 17:20:40 +00:00
Stig Bjørlykke df17ff3cac Qt: Fix use-after-free pattern
QString.toUtf8() returns a QByteArray object and .constData() returns
a pointer inside that object. It is not safe to store this pointer as
it will become invalid after the statement.

Change-Id: I8f54ede75577719008835038934e935cd5feba3f
Reviewed-on: https://code.wireshark.org/review/10067
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-18 10:52:08 +00:00
Michal Labedzki 318c3a5452 Qt: Add another C++ missing header: <algorithm> for std::sort()
Fix build error:
ui/qt/packet_list_model.cpp:270:5: error: 'sort' is not a member of 'std'
     std::sort(visible_rows_.begin(), visible_rows_.end(), recordLessThan);

Change-Id: I3a577a268f6c12e8fd97b7b6fd2429989c28e2f5
Reviewed-on: https://code.wireshark.org/review/10092
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 07:55:35 +00:00
Michal Labedzki 037524490d Qt/Minimap: Fix for Qt < 4.8
I hope it is quite right solution.

Change-Id: Ia9c883a832ddd03985eda37a9b344c4d7c8135e2
Reviewed-on: https://code.wireshark.org/review/10091
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-18 07:55:24 +00:00
Gerald Combs c57f58549c Fixup tap listener registration.
Make sure we run make-tap-reg.py on files that register tap
listeners.  Make sure Qt-specific registration routines start with
register_tap_listener_qt_.

Change-Id: Idca382180f475db71e4d1965a70ae4cc2fa4f9d5
Reviewed-on: https://code.wireshark.org/review/10074
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-17 20:47:58 +00:00
Stig Bjørlykke ec1d25d884 Qt: Avoid double call to toUtf8()
Change-Id: I4d31063b4aa37e4b0a68b5dbc17be22ef2cd151a
Reviewed-on: https://code.wireshark.org/review/10077
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-17 20:03:07 +00:00
Stig Bjørlykke 68c51724fe Qt: Always rebuild columns when fields changed
The columns must be recreated even if no capture file is loaded
because custom columns may have reference to deregistered fields.

Change-Id: I4ed7345b3200e5af211695f1a6511ee229d5f13c
Reviewed-on: https://code.wireshark.org/review/10076
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-17 19:45:44 +00:00
Gerald Combs 8d1a5498fb [Automatic update for 2015-08-16]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Idb8a2cff075a1ffe5e3cd1d6f4d3fb1b6c357cdb
Reviewed-on: https://code.wireshark.org/review/10055
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 15:10:47 +00:00
Guy Harris 2bc6f01977 *More* issues.
Change-Id: Ib415582f4bf2529c412bed329b3ee7daccde29b0
Reviewed-on: https://code.wireshark.org/review/10042
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 16:48:09 +00:00
Guy Harris 8368f3b7f0 Update the previously-added comment.
At least with kqueues, NOTE_REVOKE is delivered if the file system
containing the vnode in question is unmounted, and that gets mapped to a
change notification by QFileSystemWatcher, so the right thing should
happen.

I'm not sure whether the right thing happens on Windows.

Change-Id: I1e4c0d510f31f68d574c4d4cf20524666382930f
Reviewed-on: https://code.wireshark.org/review/10039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 03:59:58 +00:00
Guy Harris 463caf8c55 Discuss alternatives to polling all the recent files every 2 seconds.
Somebody asked about repeated SMB traffic when running the Qt Wireshark:

https://ask.wireshark.org/questions/45036/permanent-smb2-traffic-with-1997

and that's due to said polling.  On the main desktop platforms (Windows,
OS X, Linux) we can use QFileSystemWatcher plus, on Windows and OS X,
some additional stuff to check for unmounts (and get FreeBSD as a
freebie, as it works the same as OS X), and avoid timeout-based polling.

Change-Id: I3a1d0110fedcdb442ed09c16dab4bf0cb06ca331
Reviewed-on: https://code.wireshark.org/review/10038
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-15 01:49:49 +00:00
Stig Bjørlykke 12ff69d44e Qt: Fixed funnel text dialog append and prepend
Append to end and prepend to start, not the opposite.

Change-Id: Ic0e2a7f04a0d9ff18a6fd7063d0550ad35eece1a
Reviewed-on: https://code.wireshark.org/review/10027
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 09:04:14 +00:00
Stig Bjørlykke 842622594a Qt: Avoid redissect twice when changing fields
Changing fields in http, imf or ldap used to trigger redissect twice
because of UAT_AFFECTS_FIELDS and UAT_AFFECTS_DISSECTION.
Also changed from redrawVisiblePackets() to columnsChanged() because
fields in a custom column may have changed.

This also fixes reloading Lua plugins with Lua fields in custom columns.

Change-Id: I805a765690decbe7434dbf1c33ebd1113e23d16d
Reviewed-on: https://code.wireshark.org/review/10025
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-14 06:08:40 +00:00
Pascal Quantin 7661bb2540 Qt: fix copy of newer files when building with qmake
Change-Id: I8ea5e2770a0c5be3d981d986fa96fe30445db167
Reviewed-on: https://code.wireshark.org/review/10018
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-13 15:59:39 +00:00
Gerald Combs 61d1ea4172 Initialize another variable.
Change-Id: Ie53a16dc482a9c38538077f6d6a2717cfaddbaa4
Reviewed-on: https://code.wireshark.org/review/10010
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 22:20:19 +00:00
Gerald Combs 99e3244324 Initialize a couple of variables.
Change-Id: I10471b770356ad46a10740198156055e1480eeb3
Reviewed-on: https://code.wireshark.org/review/10008
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 21:13:24 +00:00
Alexis La Goutte db2692c44c Qt (main_window) fix no previous prototype for '...' [-Wmissing-prototypes]
Change-Id: I43901d37817f9b79d508336253e766d740939e70
Reviewed-on: https://code.wireshark.org/review/10003
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12 21:04:30 +00:00
Gerald Combs 5c80f08648 Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC
service response time statistics. Try to make it as lightweight as
possible, since we might want to pull this into the RPC dissectors
similar to the other SRT statistics.

Allow program names on the command line in place of numbers or UUIDs. Make
matches case-insensitive. E.g. the following are equivalent:

    -z rpc,srt,100003,3
    -z rpc,srt,nfs,3
    -z rpc,srt,NFS,3

as are the following:

    -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56
    -z dcerpc,srt,nspi,56
    -z dcerpc,srt,NSPI,56

Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4
Reviewed-on: https://code.wireshark.org/review/9981
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 20:17:35 +00:00
Gerald Combs 412f5b3716 Expert information dialog performance improvements.
Inserting QTreeWidgetItems individually is slow. This isn't a problem if
you only have a few items but the Expert Information dialog can have
thousands. Add "packet" tree items in groups, which should be much
faster. Note that we still add "group" tree items individually since
that gives us a nice progress indicator.

While we're here, make sure we show the dialog before tapping packets.

Bug: 11439
Change-Id: I8a182f4158d078cae5f42b8d1355414197f423e1
Reviewed-on: https://code.wireshark.org/review/10000
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-12 19:27:34 +00:00
Stig Bjørlykke 5a926946f4 Initialize is_reloading_lua at startup
Change-Id: I211e0f4b86cff1c311d4ae67cbb47de14846144f
Reviewed-on: https://code.wireshark.org/review/9997
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12 12:52:16 +00:00
Stig Bjørlykke dc7443fcc9 Added guards for deregistered fields
This is functions used when redissecting after a Lua plugins reload.

Change-Id: Ida14526faec1992006938a6732ee894ac83c2d12
Reviewed-on: https://code.wireshark.org/review/9995
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-12 12:09:43 +00:00
Martin Kaiser 14c75250ab [Qt Expert Info dialogue] remove our tap listener when the dialogue is destroyed
if we don't do this, there'll be a dangling tap listener and we'll see a
crash when its reset method is called

this can be triggered by opening another expert info dialogue, this will
invoke cf_retap_packets() and reset_tap_listeners() which in turn calls
the reset method of each registered tap listener

Bug: 11432
Change-Id: I8fc13351666c875e1a3641f31bada8e80d167ab2
Reviewed-on: https://code.wireshark.org/review/9979
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-11 21:27:13 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Gerald Combs a8af51d613 [Automatic update for 2015-08-09]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I14806e32e93b7f189ccc68834afa4645bda3e1aa
Reviewed-on: https://code.wireshark.org/review/9942
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-09 15:10:53 +00:00
Gerald Combs 4bba83bd9c Reset the splash timer after processing events.
Change-Id: Id71a3ac5e8f04df6a19e92021e47ea64728c2595
Reviewed-on: https://code.wireshark.org/review/9936
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-09 00:03:47 +00:00
Gerald Combs 240105eaec Fixup the Qt splash overlay progress calculations.
Fix a couple of issues in the way we calculate the splash overlay
progress.

Avoid unnecessary repaints.

Change-Id: I1f4800b2c2836b67ca9ff3d6d24af150f4379ba9
Reviewed-on: https://code.wireshark.org/review/9916
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-07 20:23:07 +00:00
Stig Bjørlykke c90fcba042 Lua: Count Lua plugins in splash screen
This will avoid slow startup when having many Lua plugins.

Change-Id: I67b5f38108a5c500682bc727734375da5fa762c8
Reviewed-on: https://code.wireshark.org/review/9910
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-07 16:17:41 +00:00
Gerald Combs fd19aafbe6 Add ONC RPC program stats.
Convert ONC RPC program stats to the stat_tap API.

Add a "user_data" member to the stat_tap_table_item_type struct.

Change-Id: I5cbf000a447ff93d30fa7f098124bdcbc34f2935
Reviewed-on: https://code.wireshark.org/review/9904
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-07 08:57:42 +00:00
Gerald Combs ff24ecceb9 Fixup stat_tap table freeing.
As it turns out we *do* need to free table elements. We also need to
free the tables themselves and clear the table array. Do so.

Change-Id: Ic1c81388eac8f47f74caea0169c79685a83aaff9
Reviewed-on: https://code.wireshark.org/review/9901
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 21:22:13 +00:00
Gerald Combs 9fd3bcc25e Add an elide mode preference for the Qt packet list.
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db
Reviewed-on: https://code.wireshark.org/review/9902
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 21:06:34 +00:00
Gerald Combs fda29e1c95 Use int_to_qstring in a few more places.
Change-Id: Id324fe21f436a233088d106553db2ed6f6e410ac
Reviewed-on: https://code.wireshark.org/review/9899
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 20:13:08 +00:00
Gerald Combs b4dea54206 Try to fix dist.
Change-Id: I04c4a06f8d2db4d9ac1a09fea25d4f587c1f1fc1
Reviewed-on: https://code.wireshark.org/review/9893
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 04:02:24 +00:00
Hadriel Kaplan 910438b17f Pcapng: support Name Resolution Block options
Make pcapng decode options in an NRB during read, and store the comment
option, and write it back out as well. Also make it handle plugin handlers
for unknown options in received NRB(s).

Change-Id: I81863ef8d85cb1c8b5ba6673ba0e562efe77714f
Reviewed-on: https://code.wireshark.org/review/9723
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-06 03:32:13 +00:00
Guy Harris 1420f3df63 Add ui_gsm_map_summary_dialog.h so it goes into the source tarball.
Change-Id: Ib0780e5ba62d069d2b41ef7ac7da513981660c7f
Reviewed-on: https://code.wireshark.org/review/9892
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-06 03:12:57 +00:00
Gerald Combs b7f5eaa524 Convert the GSM MAP stats to new "generic stat API".
Convert both the MAP statistics and summary. As with the GSM A stats
this are mostly untested.

Change-Id: Ibd3a7346b09d1401e78724c0197ec2a38deb97a3
Reviewed-on: https://code.wireshark.org/review/9883
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 01:59:10 +00:00
Gerald Combs 05eb9b69b8 Add proper base prefixes in display filter expressions.
When the user selects an enum in the display filter expression dialog
make sure we add the proper base prefix

Add a Qt UI convenience routine for formatting integers. Because
deprecating QString::sprintf was a well-thought-out decision that will
be regarded highly for decades to come.

Fix search visibility while we're here.

Bug: 11421
Change-Id: I1368bc8f464983793bdc90760cf3b7c18b6bd859
Reviewed-on: https://code.wireshark.org/review/9885
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 01:58:12 +00:00
Gerald Combs 4d673b24cd Convert Camel tap stats to new "generic stat API".
Migrate the Camel stats similar to the recent BOOTP and H.225
migrations.

Change-Id: If82617068ff4b8fa186899f66dc34a08585f66cb
Reviewed-on: https://code.wireshark.org/review/9865
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-04 19:12:00 +00:00
Gerald Combs d51d83bea5 Fix the selected packet indicator width.
Change-Id: Ic792c232524b4124bb4607cbe1979cdce8fd7e23
Reviewed-on: https://code.wireshark.org/review/9866
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-04 17:01:13 +00:00
Gerald Combs 9557c73f81 Make sure per-packet tap callbacks return gbooleans.
The tap API changed the return type of per-packet listener callbacks
from int to gboolean back in 2009. Update a bunch of functions and some
documentation accordingly.

Change-Id: I79affe65db975caed3cc296a7e2985b7b9cdf4cc
Reviewed-on: https://code.wireshark.org/review/9853
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-03 03:06:00 +00:00
Evan Huus 7c46b25927 qt: fix scrollbar crash applying conv. filter
When applying a conversation filter via context menu on the packet list,
something triggers the scrollbar to redraw when it has a maximum value of 0,
leading to a div-by-0. Guard against that (for now) though there may be a better
long-term fix.

Change-Id: I5fa0cac3e67f50a6c603a6fa10b117de5540d444
Reviewed-on: https://code.wireshark.org/review/9850
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-02 18:57:48 +00:00
Gerald Combs b1ce65350d [Automatic update for 2015-08-02]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I1c6b1044870e93459bcf4743f00be68ff8ce8ff6
Reviewed-on: https://code.wireshark.org/review/9851
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-02 15:10:53 +00:00
Gerald Combs 1afe288c8c More packet detail context menu items.
Add the wiki and field reference items to the packet detail context
menu. Add the "Go To Linked Packet" item in the Go menu and packet
detail context menu. Use "Linked Packet" instead of "Packet Reference"
and "Corresponding Packet". Remove more pending item comments.

Change-Id: I66c40f71738f0996690f4818a546520ea0747088
Reviewed-on: https://code.wireshark.org/review/9841
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-01 01:07:23 +00:00
Gerald Combs 26c933b8cc Fix binary data copying.
As the QClipboard::setMimeData documentation says, "Ownership of the
data is transferred to the clipboard." Allocate the mime data object
accordingly.

Note the results of trying to paste into hex editors on Windows.
Frhed works. Hex Editor Neo and HxD do not.

Change-Id: I46691ba95bf1f5c38817cd42ded73e8e67e4ee97
Reviewed-on: https://code.wireshark.org/review/9837
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-31 20:50:05 +00:00
Gerald Combs 5336c9aabc More spacing fixups.
Make spacing more consistent.

Change-Id: I8980a84ca70660057016985299b0f95761076893
Reviewed-on: https://code.wireshark.org/review/9835
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-31 19:23:01 +00:00
Gerald Combs 787fa27cd4 Remove spaces.
Change-Id: Iabf5f7610ea5205ad4500502e2b531a8ee130484
Reviewed-on: https://code.wireshark.org/review/9834
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-31 19:10:22 +00:00
Gerald Combs d8d3c52f1e Use an ellipsis character instead of three dots.
The OS X Human Interface Guidelines at

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/TerminologyWording.html#//apple_ref/doc/uid/20000957-CH15-SW3

says:

"Be sure to create the ellipsis character using the key combination
 Option-; (Option-semicolon). This ensures that an assistive app can
 provide the correct interpretation of the character to a disabled user.
 If you use three period characters to simulate an ellipsis, many
 assistive apps will be unable to make sense of them. Also, three period
 characters and an ellipsis don't look the same because the periods are
 spaced differently than the points of an ellipsis."

The Windows desktop applications guidelines has a section on ellipses:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn742478.aspx

but doesn't specify the a single glyph vs three dots.

The GNOME HIG at

https://developer.gnome.org/hig/stable/typography.html.en

says "Take Advantage of Unicode" then specifically says to use U+2026
HORIZONTAL ELLIPSIS.

Remove the ellipsis from "Find Next" and "Find Previous". Neither
requires user interaction.

Change-Id: I0e6c28bb8b3a84b242731e2ca96f1a6f6f42c303
Reviewed-on: https://code.wireshark.org/review/9833
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-31 18:55:06 +00:00
Gerald Combs c321171ec8 Add Colorize to the packet detail menu.
Change-Id: Idaac0b52e6e4534f40e13839e6dbce2408ca6bfa
Reviewed-on: https://code.wireshark.org/review/9831
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 23:39:05 +00:00
Gerald Combs da07c62bd0 More context menu updates.
Add "Follow" and "Export Packet Bytes" to the packet detail context
menu. Remove duplicate SCTP menu. Remove redunant action text.

Change-Id: If69815dc774806e267fbd71aa390b0af6f3b0d14
Reviewed-on: https://code.wireshark.org/review/9829
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 21:12:42 +00:00
Gerald Combs 9603db48d1 Make copy menu item names more consistent.
Change-Id: Ia7b2a87ba9ad843dfa9200d69eeb94275a3dc0bb
Reviewed-on: https://code.wireshark.org/review/9827
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 19:36:26 +00:00
Gerald Combs 549b8f08e8 Add a missing menu item.
Add "Copy as Filter" to the packet list context menu. Remove completed
item comments.

Change-Id: I1e2d9ebcff2fb36918d3e7525690cfb105cb1b13
Reviewed-on: https://code.wireshark.org/review/9826
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 19:25:10 +00:00
Gerald Combs 16b048d34b Packet list and detail context menu updates.
Add some missing items to the packet list and detail "Copy" context
menus. Don't nest the "Copy" items so deeply. Add YAML to the supported
summary formats.

Note that "Copy as Binary" copies to the clipboard as
application/octet-stream, which is a) arguably correct, and b) not very
useful. Fixes welcome.

Enable and disable packet detail context menu items from a set of
booleans similar to the packet list.

Change-Id: Iaa931c766aa476c33f27de089e5c4dbaf9ce74d6
Ping-Bug: 9320
Bug: 10831
Reviewed-on: https://code.wireshark.org/review/9825
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30 19:13:38 +00:00
Gerald Combs d6f59cd10f Main menu and packet list menu updates.
Enable and disable packet list-relasted menu items in one place. Add
"Colorize Conversation" items to the packet list context menu.

In the GTK+ UI we tend to disable entire menus, which makes their items
inaccessible. Try not to do that in the Qt UI so that menu items are
always visible even if they're disabled.

Remove commented items which are now complete.

Change-Id: I69b878b45334bf88014694b1bf016278fa55a94b
Reviewed-on: https://code.wireshark.org/review/9819
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-29 22:38:43 +00:00
Gerald Combs a03a43bd32 Capture file retapping fixups.
Add CaptureFile::delayedRetapPackets, which starts retapping after the
current batch of UI event are processed. Call it in the constructors of
various dialogs so that they are shown before tapping starts.

This *might* fix a crash found when following large streams from the
Conversations dialog.

Change-Id: If1b87491621ab7efcc0519f95891d34dcd9d18c1
Reviewed-on: https://code.wireshark.org/review/9818
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-29 20:45:48 +00:00
Gerald Combs 65a1f60e70 Add "Disable Protocol..." to the ProtoTree context menu.
Assume that "I don't want to see this" counts as a preference and add it
under the "Protocol Preferences" submenu.

Change-Id: I396e2476509db9df895826f8817b191893bcb14a
Reviewed-on: https://code.wireshark.org/review/9812
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-28 03:54:38 +00:00
Gerald Combs 01bc31cded Fixup packet list context menu behavior.
Add logic to setMenusForSelectedPacket for setting the enabled states
for the "Apply As" and "Prepare A" actions. Update the PacketList
context menu code to fill in the right filter at the right time.

Exit out of setMenusForSelectedTreeRow if the packet list has focus so
that we don't clobber the enabled states of various actions.

Take the "Apply As" and "Prepare A" context menu titles from their main
window counterparts. Remove actionApply_as_Filter and
actionPrepare_a_Filter.

Remove completed to-do items.

Change-Id: I8f6f538bb7786d8df02a999f3b449dfde640e847
Reviewed-on: https://code.wireshark.org/review/9810
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-27 23:26:04 +00:00
Gerald Combs 17320173f8 Add an application-wide style sheet.
Use it to work around poorly drawn splitters on OS X.

Change-Id: Ic8e7331b1ba37fe783312b4460961f361297c7f0
Reviewed-on: https://code.wireshark.org/review/9798
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-27 15:48:01 +00:00
Gerald Combs 179da0f630 [Automatic update for 2015-07-26]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I3ddd31b2ebded50dcbe974ce99ef9b417b39aa2f
Reviewed-on: https://code.wireshark.org/review/9796
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-26 15:10:08 +00:00
Gerald Combs 19578ba619 Minor Enabled Protocols tweaks.
Try to keep long protocol names from widening the first column too much.

Expand all tree items.

Change-Id: I4f09aa2a895aa0ee5a6faab8242768b62b1208bc
Reviewed-on: https://code.wireshark.org/review/9771
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-26 07:29:08 +00:00
Gerald Combs 7be155ee1e Try deleting WiresharkDialog when we close it.
QDialog::accept and ::reject hide the dialog but don't delete it. In the
case of WiresharkDialog and its subclasses we might leak memory or leave
files open. Call deleteLater when we close the dialog.

Change-Id: Ie0b848a7deeeee4667925b0d886e498f13a86bfc
Reviewed-on: https://code.wireshark.org/review/9781
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-24 20:03:28 +00:00
Gerald Combs db82d0f394 Fix the Copy menu placement in the ProtoTree context menu.
Change-Id: I8e967000b769918af2c0fb3dae22b3d36be07647
Reviewed-on: https://code.wireshark.org/review/9765
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-24 01:40:54 +00:00
Gerald Combs da5eba636a Fix QCocoaMenu errors.
In PacketList and ProtoTree, create our own QMenus instead of stealing
actions from the main window. This only fixes the errors listed in bug
10890. Add "to do" items for other bugs.

Bug: 10890
Change-Id: I1c7ce8e4b863de95b2836e0cdcfb25824fe21edd
Reviewed-on: https://code.wireshark.org/review/9760
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23 20:37:50 +00:00
Gerald Combs a5f7b84dba Fixup selected packet arithmetic.
Or, "I can mathing" if you prefer meme-based commit messages.

Change-Id: I8fd1db0e2a1e99525191ae6b33115ef8e38ab2f4
Reviewed-on: https://code.wireshark.org/review/9758
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23 18:23:35 +00:00
Michael Mann 2c534a93ac Add Enabled Protocols dialog for Qt
This dialog combines the "protocols" and heuristic dissectors (from GTK) into a single tree view where heuristic dissectors are children of their protocol.

Change-Id: I107656afd079c1d1c8a98161b736e4b4ad84f813
Reviewed-on: https://code.wireshark.org/review/9739
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-23 09:15:36 +00:00
Gerald Combs 4d6ef27b52 Qt < 5.1 doesn't have devicePixelRatio().
Change-Id: I490617db6b645c0129c565eb4b6efceeece9d535
Reviewed-on: https://code.wireshark.org/review/9751
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23 03:21:06 +00:00
Alexis La Goutte 780c300f23 qt_ui_utils.h: fix empty paragraph passed to '@return' command [-Wdocumentation]
Try 2...

Change-Id: I2809a46a60732cdef26da9e847588dcfe39781ee
Reviewed-on: https://code.wireshark.org/review/9590
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-23 01:49:02 +00:00
Gerald Combs 1514fe06cd Show the current selection in the overlay scrollbar.
Change-Id: Ie92b7ae170938eac71ede751d9067e1d47293092
Reviewed-on: https://code.wireshark.org/review/9750
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-23 00:24:08 +00:00
Pascal Quantin 6452caa3b3 Fix retrieval of data link type supported by remote interfaces with authentication
Make use of -A parameter when querying data link types supported by a given interface with dumpcap.
Ensure to pass the authentication parameters configured for a remote interface when calling capture_get_if_capabilities()

Bug: 11366
Change-Id: I4efea615084a82108e4a12a64e8c46817f30a5c6
Reviewed-on: https://code.wireshark.org/review/9690
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-22 07:10:10 +00:00
Pascal Quantin 32d9a1d714 Ensure to copy the (un)resolved (source|destination) address columns before freeing epan memory
Otherwise addresses like AT_STRINGZ using pinfo->pool are using an already freed memory block

Bug: 11387
Change-Id: I615d6bf202d57a949e75ba06a39f8d3e464def2f
Reviewed-on: https://code.wireshark.org/review/9744
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-22 07:05:52 +00:00
Alexis La Goutte 6e7f302ade Translation (Qt): fix typo
Duplicate names and also typo about service (=> Services)

Found by yfdyh000 via Transifex

Change-Id: I011b98a25828b8fc55b395d7ed5677da51a30f43
Reviewed-on: https://code.wireshark.org/review/9741
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-21 23:26:15 +00:00
Gerald Combs e30a0ff765 Add manual name address resolution.
Make it an editor frame instead of a dialog similar to the column editor
and prototocol preference editor.

Change-Id: If1a0cdf02dcab0eca98e8d39c94a3c2fe236df5a
Reviewed-on: https://code.wireshark.org/review/9743
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-21 22:43:05 +00:00
Guy Harris 8e4ae943b2 show_timer_ isn't used on OS X with Qt < 5.0.0.
Change-Id: I5b7a73dcc3bb0f11d24b6d1e9e9d2bcd1f333278
Reviewed-on: https://code.wireshark.org/review/9728
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-20 22:42:34 +00:00
Gerald Combs 127a9bde00 Add a ProgressFrame to the RTP analysis dialog.
Use it to show save file progress.

Change-Id: Iff95b122825006352dc13cf4b7787e29b0d2c5f0
Reviewed-on: https://code.wireshark.org/review/9725
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-20 22:41:50 +00:00
Michal Labedzki 1e487664bc Qt: Add option to back white line separator for packet list items
This uses one line (on bottom) of items and makes it white.
Seen in Wireshark on some configurations of GTK 2 on Linux,
so backports it to Qt for people who like it.

In my opinion it helps if you use packet list background colors
for frames and you have a lot of following frames with
the same background color.

Bug: 10954
Change-Id: Id8f58520d7224db4eb8181bcc04febd7416a8578
Reviewed-on: https://code.wireshark.org/review/7293
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-20 21:21:28 +00:00
Gerald Combs 7e13cacb9b Try to minimize sorting overhead.
Process application events as little as possible while sorting.

Change-Id: I9d779aebf6edaafc1e6af3a99b4a0dac682ea6b6
Reviewed-on: https://code.wireshark.org/review/9722
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-20 20:09:12 +00:00
Gerald Combs 63edb9904f Add general a busy progress indicator.
Rename CaptureFileProgressFrame to ProgressFrame. It's not limited to
capture files. Add "busy" routines there and in MainStatusBar. Show a
busy indicator while sorting columns.

Use toByteArray().constData instead of .data. I'm not sure if it matters
in our case but it's more correct.

Change-Id: Ibe35fee9b9dd3fabb5ff8ddcc21f6bf59dec4af6
Reviewed-on: https://code.wireshark.org/review/9720
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-20 19:48:43 +00:00
Gerald Combs 0907a6ebb8 [Automatic update for 2015-07-19]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I43c44e68e802ed2ab595714ecaf072d941c852ad
Reviewed-on: https://code.wireshark.org/review/9701
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-19 15:10:10 +00:00
Michal Labedzki 3faec795e9 Qt/Bluetooth: Add HCI Summary dialogue
HCI Summary dialogue collect HCI Opcodes, HCI Events, Hardware Errors,
Statuses and Reasons. Also show occurrence of them. The top level item
is group of items (by OGF or types), the second level item is in real
command, event, hardware error, status or reason. The third level items
are direct link to packet that contains second level item type.

Change-Id: I6b6bd02533c4605a2dd2c1f5dfee46f72a0f3fdc
Reviewed-on: https://code.wireshark.org/review/9676
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-17 13:54:43 +00:00
Michal Labedzki 5491fea201 Qt: Fix DecodeAs for String tables
It seems that string object die to early. Add space when it can live.

Change-Id: I4e776134ce6782bd6e854ab2bc3c188e80530839
Reviewed-on: https://code.wireshark.org/review/9677
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-17 08:06:06 +00:00
Gerald Combs 255d53dfc1 Draw packet colors in the packet list scrollbar.
Inspired by (but not as fancy as) Packet Fence, an enhancement written
for Ethereal a loooong time ago by Martin Visser:

https://www.wireshark.org/lists/ethereal-dev/200011/msg00122.html

Several text editors call this a "minimap".

Color each scrollbar raster line to match the color of up to 7 packets.
Note in the comments why this number was chosen.

If we have any flagged frames (marked, ignored, time ref) indicate them
on either side of the scrolbar.

Handle HiDPI (retina) displays. This means that your window size depends
on the height of your scrollbar *and* your monitor resolution.

Qt's idea of the slider rect doesn't match up with the slider on OS X.
This might be local to my build -- I can replicate it Qt Creator.

Change-Id: Ia089d2d766ce37bab11e22d1a5721b4908935304
Reviewed-on: https://code.wireshark.org/review/8982
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 22:57:31 +00:00
Joerg Mayer 0d4f412015 Get rid of _U_, which was (mis)used in some places:
- It was used even though the variable actually *was* in use for
  some compile settings.
- It's not the c++ way.

2do: In case the definition of _U_ in Wireshark.pro is only used for
  the ui/qt directory, it should be removed to avoid further (ab)use.

Change-Id: I22d6269a66d6ed558035aad3e6702c4a9c8af1fa
Reviewed-on: https://code.wireshark.org/review/9665
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-16 21:02:53 +00:00
Pascal Quantin d23ff4f5f8 Qt: remove unused parameters
Change-Id: I45fcf87f99dc15eb49343119fa134fb5698b15cf
Reviewed-on: https://code.wireshark.org/review/9664
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-16 20:04:38 +00:00
Gerald Combs 41ed7127a5 Qt: Frame flag updates.
Move frame flag (mark, ignore, ref_time) member functions from
PacketList to PacketListModel. They arguably belong there and we can
emit dataChanged to signal updates.

Rename some variables named "index" since they shadow a function name.

Change-Id: I9a731a76e4e63e562b561c29d13915278d5a7dbb
Reviewed-on: https://code.wireshark.org/review/9663
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 19:13:14 +00:00
Gerald Combs 6d33c124d5 Add display_is_remote.
Add a display_is_remote function and use it instead of get_conn_cfilter
to check for remoteness.

Change-Id: Ia93d113afec36ede55daf7dc8394b2dc0d8c9abf
Reviewed-on: https://code.wireshark.org/review/9659
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 16:17:33 +00:00
Gerald Combs d2acb04b4c Add the RTP Stream Analysis dialog.
Combine the GTK+ RTP Stream Analysis and RTP Graph Analysis dialogs into
one. Yell at the user less. Disable the Analyze RTP Stream menu item if
we don't have an RTP stream selected.

There are a *lot* of moving parts in this dialog. I've tested with the
few RTP captures I have but it's by no means complete.

"To do" items are listed at the top of rtp_analysis.cpp.

Change-Id: Id503977f069bebc46cc68bc749f0c9cbf4d37bf6
Reviewed-on: https://code.wireshark.org/review/9650
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-16 00:30:14 +00:00
Gerald Combs 0744e677d3 Check for a valid pointer when ignoring a frame.
Change-Id: I1a4a6b3f729c818a68bee1b6b8de3778130252a4
Reviewed-on: https://code.wireshark.org/review/9652
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-15 23:05:41 +00:00
Guy Harris 1ac7de58c7 Resize the name column every time we re-display the interface tree.
Interfaces can appear and disappear, changing the maximum length of the
interface name column; resize it each time we reconstruct the tree.

Change-Id: I38b40f6c3ce51272e8bbb0c7f7fbaa7255886e0e
Reviewed-on: https://code.wireshark.org/review/9641
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-15 03:54:21 +00:00
Michael Mann cdeae7e72b Add a "heuristic dissectors" tab to the Enable Protocols dialog.
This allows for a global place to enable/disable all heuristic dissectors.  This removes the need for individual dissector preferences, but those will be removed at a later date.  The more important part is the epan code to save/restore the enabled state of the heuristic dissector.  The GTK dialog was more for quickly testing the feature (there was already some GTK code in place that started the heuristic dialog tab)

Change-Id: Ie10687505c27a4456c49d5c4c69a5fc5f6394275
Ping-Bug:11152
Reviewed-on: https://code.wireshark.org/review/9508
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-14 11:28:55 +00:00
Gerald Combs c305f08921 PacketList column fixes.
Add a columnsChanged slot to PacketList and move the column update code
from redrawVisiblePackets there. Make sure we call
packet_list_model_->recreateVisibleRows, which should fix the behavior
described in bug 11324. Call columnsChanged when we, uh, change columns.

Add a sectionMoved slot to handle column reordering.

Don't rebuild the column list when we update the widgets in the column
preferences frame.  Do enable and disable the "remove" button as needed.

Try to keep the user from removing all of the columns in both the packet
list and column preferences.

Left as an exercise for the reader: The GTK+ UI also fails when you
remove all of the columns via the preferences:

  packet_list.c:377:packet_list_sort_column: assertion failed: (col)

Bug: 11324
Change-Id: Id58cf98e42cbda9aa2fc370ea06b8bcc6098c8ca
Reviewed-on: https://code.wireshark.org/review/9591
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-13 02:36:41 +00:00
Gerald Combs 39a2d9468b Fixup packet list selection.
Be less aggressive about resetting the packet list model so that we
retain our selection when (un)coloring packets or rebuilding columns.

Correctly enable a colorization menu item while we're here.

Change-Id: I8d1c8f26dbb8a814b8344b609695b77632006e4b
Reviewed-on: https://code.wireshark.org/review/9608
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-12 19:59:58 +00:00
Gerald Combs 0f45a13518 [Automatic update for 2015-07-12]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Icf621f6bcde5736653771c3789772b692d5cdd43
Reviewed-on: https://code.wireshark.org/review/9605
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-12 15:11:30 +00:00
Alexis La Goutte 080c27f7ff simple_statistics_dialog(.h): fix parameter 'rtd_table/user_table' not found in the function declaration [-Wdocumentation]
Change-Id: Ie82d8528953169f1a95f985b36848176a45f8187
Reviewed-on: https://code.wireshark.org/review/9571
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-11 15:01:23 +00:00
Gerald Combs c7dbc5a01b Set the font.
Change-Id: I97abd504727ef71bb29969f0a7555e17eaa70561
Reviewed-on: https://code.wireshark.org/review/9596
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-11 01:43:13 +00:00
Gerald Combs d564ea9bea Qt: Add Colorize Conversation menu items.
Add the "View→Colorize Conversation" menu similar to the GTK+ UI. Add
the "Reset" item under the "Colorize Conversation" menu instead of the
top-level "View" menu. Make sure the "Reset" shortcut is Ctrl+Space even
on OS X. Normally Qt would convert it to Cmd+Space, but that's used by
Spotlight.

Add StockIcon::colorIcon and use it to create filled square icons.

Change-Id: I2af9e26d025cdaf97482422bbb9440e28e18d1ac
Reviewed-on: https://code.wireshark.org/review/9595
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-11 00:41:01 +00:00
Guy Harris a1a2d50716 Make .o files, not .cpp and .h files, depend on the ui_*.h files.
That's one of the mechanisms the autotools documentation suggests using
to handle generated header files.

Using it means that "make dist" will no longer try to build those files
(they're not part of the distribution - and they can't be, as the files
would be different for Qt 4 and Qt 5, and need to be generated by the
uic from the same version of Qt as the one against which Wireshark is
being built).

This means we don't need to try to find uic, moc, or rcc if we're not
building with Qt, so don't do so.

Change-Id: Id2aadb8289598b82e14e4ed402ff8cdc15fdef74
Reviewed-on: https://code.wireshark.org/review/9583
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-10 21:30:33 +00:00
Joerg Mayer 52d04fdc1e Fix a typo
Change-Id: If608ef78526c1876cba7650b42eca1d9c9b4e817
Reviewed-on: https://code.wireshark.org/review/9586
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-10 07:54:16 +00:00
Gerald Combs 0aaf0f04cf Add the "Resolved Addresses" dialog.
The GTK+ equivalent is named "Address Resolution" but "Resolved
Addresses" seemed (to me at least) to be more clear.

Change-Id: I1806354d91bb5ce8af11d20568b92a04c78d4d73
Reviewed-on: https://code.wireshark.org/review/9580
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-10 03:20:33 +00:00
Gerald Combs fdd07c4d3a Make sure we uncheck the "Find Packet" action.
Make sure we uncheck the "Find Packet" action when we're done finding
packets. Make the "Go To Packet" action checkable and ensure that it's
properly checked an unchecked as well.

Change-Id: I979cabfd950ec4807ebcd40664b44b600557cf48
Reviewed-on: https://code.wireshark.org/review/9577
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-09 17:33:59 +00:00
Alexis La Goutte 7b85f62ba3 service_response_time_dialog/response_time_delay_dialog(.h): fix '@return' command used in a comment that is attached to a function returning void [-Wdocumentation]
Change-Id: I84682651f40ab9e8f54a6ae656d0670096b5a3bc
Reviewed-on: https://code.wireshark.org/review/9559
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-09 00:28:42 +00:00
Alexis La Goutte ac7a46505f main_window(.h): fix parameter 'menu_path' not found in the function declaration [-Wdocumentation]
Change-Id: I98a9388f44fe38261fde5422ac821fbb6c1d993c
Reviewed-on: https://code.wireshark.org/review/9553
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-09 00:22:45 +00:00
Alexis La Goutte d88639cb4a qt_ui_utils.h: fix empty paragraph passed to '@return' command [-Wdocumentation]
Change-Id: I120ed85ee88253084646db4817ae77a8c90492f2
Reviewed-on: https://code.wireshark.org/review/9557
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-09 00:20:46 +00:00
Gerald Combs a8faa04234 Qt: Add dynamic menu support.
Generalize the dynamic menu code and make it possible to connect
multiple types of actions to their corresponding slots.

Change-Id: Ib915ad5a666310e2a6e366fada006336820d1653
Reviewed-on: https://code.wireshark.org/review/9568
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-09 00:05:51 +00:00
Guy Harris 131e0ab7ea Handle setModule(NULL) more safely.
If module_name is null, we can't do much of anything - we don't have a
protocol ID, so we don't have a protocol.

Change-Id: I42c2fa4b47e39d7ac122c60be91b5d408bf30a1d
Reviewed-on: https://code.wireshark.org/review/9569
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-08 23:20:03 +00:00
Gerald Combs 4eca268935 Add SimpleStatisticsDialog.
To do:
- Refactor dynamic menu item placement.

Change-Id: I087de9f2fa3c2ff7dc08e5d54bc9c1b984fdd7b1
Reviewed-on: https://code.wireshark.org/review/9561
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08 17:01:15 +00:00
Guy Harris d7f0118a74 Put back closing } accidentally removed in previous commit.
Change-Id: Ic02b0c86e55751a27d5d0417f4f5314def69e794
Reviewed-on: https://code.wireshark.org/review/9550
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-08 05:18:00 +00:00
Gerald Combs e93fa8a82d Add ResponseTimeDelayDialog.
Change-Id: Ie1ea316643a3465763aec71f4a3ef4bf1a5ae639
Reviewed-on: https://code.wireshark.org/review/9548
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-07 23:17:51 +00:00
Alexis La Goutte 5ccd8afe9f qt_ui_utils.h: fix @param command used in a comment that is not attached to a function declaration [-Wdocumentation]
Move class declaration on the top

Change-Id: I4ced45f2c677a41cc8f5180d2eb5d211f4c6e6c1
Reviewed-on: https://code.wireshark.org/review/9518
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-07 22:57:33 +00:00
Joerg Mayer 0619ed241c Finish removal of Q_UNUSED.
Todo: qcustomplot via upstream

Change-Id: I19cf98f1281ecb1f6efbb7d36c997d5aa43f5baf
Reviewed-on: https://code.wireshark.org/review/9547
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-07 22:17:22 +00:00
Joerg Mayer 51a37b666a Continuing to remove Q_UNUSED
Change-Id: I54bc4a1b7d39abd1bb88ee361b0de5fcbca1efe8
Reviewed-on: https://code.wireshark.org/review/9546
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-07 21:50:17 +00:00
Gerald Combs e91ca72a44 Qt: Add initial Lua support.
Add a FunnelStatistics class, which is the main interface between the Qt
UI and the Funnel API.

Add FunnelTextDialog, which implements the text_window, ProgDlg, menu,
and other routines. Add FunnelStringDialog, which implements dlg_new.

We currently only support "Tools" menu items (MENU_TOOLS_UNSORTED, aka
REGISTER_TOOLS_GROUP_UNSORTED). Add a disabled placeholder to the
"Tools" menu in case we don't load any scripts.

Use "struct progdlg" instead of needlessly casting to
funnel_progress_window_t.

To do:
- Add support for MENU_STAT_UNSORTED, MENU_STAT_GENERIC, etc.
- Make the firewall config generator a Lua script?
- Add FunnelGraphDialog? It seems like it would be useful to
  make QCustomPlot accessible to Lua scripts.

Ping-Bug: 9845
Change-Id: Iefff02e9032ed1853666f7902509ed08b431e7a7
Reviewed-on: https://code.wireshark.org/review/9523
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-07 20:49:30 +00:00
Guy Harris 30d82a423e Actually, user_data *is* used there.
Change-Id: Ic22741e6551b5ec2eb76408ff8521067d9d40a88
Reviewed-on: https://code.wireshark.org/review/9534
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-07 07:47:16 +00:00
Joerg Mayer 21754f43e1 Starting to get rid of Q_UNUSED declarations for unused function parameters.
The official C++ way is to leave out the variable name instead. This has the
advantage to be reliable: In one case a variable declared unused was later
used.

Change-Id: I1c96636f7fa7a621d1594d1e9cacaec75c561faa
Reviewed-on: https://code.wireshark.org/review/9532
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-07-07 06:29:31 +00:00
Gerald Combs 9b180e530f [Automatic update for 2015-07-05]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I7c644cb36af2a5c81efc4c22f1355b1a5e599b49
Reviewed-on: https://code.wireshark.org/review/9500
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-05 15:10:10 +00:00
Michal Labedzki c5ec50ed1d Add missing C++ header
This fixes:
ui/qt/wireshark_application.cpp:588:5: error: 'sort' is not a member of 'std'
     std::sort(sgi_list.begin(), sgi_list.end(), qActionLessThan);

Change-Id: I70058f0fcbabb0279bed5c62d09d55d88bda0fd4
Reviewed-on: https://code.wireshark.org/review/9492
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-04 15:31:21 +00:00
Gerald Combs fdb85029fd Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog,
similar to StatsTreeDialog. Add initial plumbing for statistics menu
items and command line invocation.

Don't append "..." to menu item names. Don't add menu icons. In each
case this avoids repetitive UI clutter.

Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c
Reviewed-on: https://code.wireshark.org/review/8864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:09:13 +00:00
Guy Harris b107e93c88 Don't assume the source directory's path has no spaces in it.
Have SOURCES_TAP just contain the file names of the taps to run through
make-tap-reg.py, and pass $$PWD, properly quoted, as the "source directory"
argument to make-tap-reg.py.

Change-Id: I09382ccf9931db636aaeeb5d94c0ae029453ea9d
Reviewed-on: https://code.wireshark.org/review/9432
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-01 07:16:37 +00:00
Gerald Combs 2325550c0d Fix setting widget visibility when changing the layout.
Fixes a bug exposed by g5265bc3.

Change-Id: Ia0775aa068f5e9e1eeb66384bac97fe57f3c957c
Reviewed-on: https://code.wireshark.org/review/9231
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-30 03:23:20 +00:00
Gerald Combs 0b0100befa Fixup the packet list navigation action behavior.
Change-Id: I124fe3c3755556e81c65443b8b9744a89394dc70
Reviewed-on: https://code.wireshark.org/review/9218
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-29 17:22:34 +00:00
Michael Mann da09a1bfd8 Take all epan_column_info members that always get allocated to "number of columns" to share their own data structure.
Change-Id: Ib982662db6cf68730a7d121eac60d9bc5ae67429
Reviewed-on: https://code.wireshark.org/review/9195
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-29 02:11:04 +00:00
Gerald Combs b09891df95 [Automatic update for 2015-06-28]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Idf976da88eab4126089b612084ce9d4a4643d80c
Reviewed-on: https://code.wireshark.org/review/9201
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-28 15:08:30 +00:00
Pascal Quantin 0953c36ec9 Qt: tweaks to Capture Interfaces dialog
- Add option to stop capture after X files are created
- Increase the max value for number of packets / files / bytes / seconds from 1000 to INT_MAX
- Fix capture name file selection

Change-Id: I9fb8eeaa925e5bd5380bb654686575f41126546a
Reviewed-on: https://code.wireshark.org/review/9162
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-26 18:37:35 +00:00
Joerg Mayer 8ad9019c3f Commit d4aa1a1c24 added some Q_UNUSED
statements to c++ files. The standard method to mark function parameters
as unused in cpp is to just leave out the variable name.

Change-Id: I4f07ad9f494ad16388eadb67e93ea7b26ae70eb5
Reviewed-on: https://code.wireshark.org/review/9152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-26 00:21:14 +00:00
Martin Kaiser 6122b4b616 Qt: when a capture file is closed, go back to the welcome screen only
if we're not capturing to multiple files

Change-Id: I18d36ef8e7e3525b2bd8d94f2b2349cefa3ecb52
Reviewed-on: https://code.wireshark.org/review/9161
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-25 21:59:53 +00:00
Gerald Combs 5265bc3fce Make sure the byte view maintains visibility.
In ByteViewTab::clear, make sure we stay hidden or visible as
appropriate.

Bug: 11313
Change-Id: I12fa5169e840dbc4d27b6525fe6be72e13acce5d
Reviewed-on: https://code.wireshark.org/review/9155
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-25 21:21:23 +00:00
Evan Huus 78e71f6f5a Remove the other g_hash_table_contains
Missed a bunch of them in g131f8f0.

Change-Id: I5b1df810a31c26c3ab3cd778f8774519283217c8
Reviewed-on: https://code.wireshark.org/review/9143
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-25 18:56:15 +00:00
Martin Kaiser 9dd21d9fab Qt, cmake: put the build dir before the source dir in the include path
this should prevent Visual Studio from picking up generated include
files which may be lying around in the source tree (as leftovers from
previous in-tree builds)

Change-Id: I2406c31bc0638eb13ed4b539ddc607512051033d
Reviewed-on: https://code.wireshark.org/review/9130
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 17:12:00 +00:00
Martin Kaiser 534d1d5eae Qt: use <> for including the generated ui_*.h files
this should make Visual Studio pick up the generated include files
from the build directory instead of the source directory (which may
contain lefovers from an in-tree build)

Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b
Reviewed-on: https://code.wireshark.org/review/9129
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 17:11:19 +00:00
Roland Knall acc581081e Plugin Interface: Add GUI callbacks
Rename ext_menubar to a more appropriate plugin_if.

 External menus can be implemented by plugins to present
 additional menus for deep-packet analysis. One side-effect
 of such menus being implemented as plugins is, that they
 are being executed in different threads and therefore can
 only use limited access to the main GUI. Also, there is
 no safe cross-gui (GTK and Qt) way for many features.

 This patch implements a first functionality, by which a
 plugin implemented using ext_menubar can apply a display
 filter to the main view.

 For now the implementation supports filtering, as well as
 saving a preference.

Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9
Reviewed-on: https://code.wireshark.org/review/8773
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 16:23:08 +00:00
Pascal Quantin d4aa1a1c24 Qt: mark unused parameters as such
Change-Id: Ib53d6da0d6660cf2c6a3283ff6123a2f18a8abda
Reviewed-on: https://code.wireshark.org/review/9128
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-25 16:13:34 +00:00
Martin Kaiser cb84022296 Qt: fix crashes when Wireshark is closed while running a capture
if we haven't captured any packets yet, don't display a warning about
unsaved changes

make sure that we're not running into a scenario where
MainWindow::testCaptureFileClose() tries to close the capture file at
the same time as the pipe handler who sees an eof on the pipe

cf_has_unsaved_data() should return false if we have a temporary file
that contains no packets

Change-Id: I18d75bd658b85d45dd3313d49e2cd654c6300de5
Reviewed-on: https://code.wireshark.org/review/9109
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 15:55:36 +00:00
Jeff Morriss 1810112f2d Add minimize and maximize buttons to the TCP stream dialogs.
The first thing I generally do when I open a graph is to maximize it.
Having a maximize button makes that a lot easier. Call QDialog(NULL,
Qt::Window) similar to g80342e4.

Call QDialog(NULL) in the about box.

Change-Id: I4f229ab579d0912cb03ba8f8d0300d933d0ba914
Reviewed-on: https://code.wireshark.org/review/7072
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-25 15:51:29 +00:00
Evan Huus 89cc85b5ef Disable "Refresh Interfaces" when capturing
It breaks restarts, and doesn't do anything useful at this point anyways.

Bug: 11176
Change-Id: I6a010becf851fea8690b445874b29b54546fb2e3
Reviewed-on: https://code.wireshark.org/review/9106
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:43:13 +00:00
Evan Huus 0d28caf880 qt: fix more button states
As in gcc614a9 we have to manually uncheck buttons if we decide not to action
them.

Change-Id: Ia5dc29a292bc6d75a1e8753da06a053cafa66866
Reviewed-on: https://code.wireshark.org/review/9107
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:42:35 +00:00
Evan Huus cc614a93d8 qt: fix button state when cancelling save
If the user decides not to capture after all, by hitting cancel when prompted
for their unsaved changes, we have to manually uncheck the button again because
Qt helpfully checks it for us.

Bug: 11145
Change-Id: I362d72787ddb138d382a899d091698c6652eebb2
Reviewed-on: https://code.wireshark.org/review/9102
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 21:26:39 +00:00
Alexis La Goutte 17c59f5090 Qt: Add Reload button on MainToolBar
Add @2x versions of x-capture-file-reload as well.

Change-Id: I08819cf66903884e0344a4f9bcd891befb582e90
Reviewed-on: https://code.wireshark.org/review/9066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-24 17:10:01 +00:00
Evan Huus 69cdfe9410 Remove another batch of deprecated tvb_length calls
Change-Id: Icfdde38e40cca05d0705a081153a4ea3e8782ee7
Reviewed-on: https://code.wireshark.org/review/9086
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24 04:30:35 +00:00
Martin Kaiser 633ba955b2 [Qt] switch screens only if we're acutally starting a capture
don't do the switch when the capture can't be started
(e.g. because we didn't select any interface from which to capture)

Change-Id: Ibabd703863d546c95b9fbe9bd2280d67a22dfc26
Reviewed-on: https://code.wireshark.org/review/9072
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 20:39:15 +00:00
Martin Kaiser 911b9347ff [Qt] if the capture is stopped before we received any packet...
... we go back to the main welcome screen like we do in GTK

Change-Id: I64ef29665af61da55c1971ca59d1fab25d205874
Reviewed-on: https://code.wireshark.org/review/9071
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-23 20:39:01 +00:00
Pascal Quantin 0901e26505 Qt: change default behavior of 'Decode As' window
Up to know Qt 'Decode As' window was saving manual configuration automatically, contrary to GTK UI.
This can be misleading when decoding protocols without a fixed identifier (port number, USB bus/device id, ...).
Opening a new trace might lead to previous and now irrelevant settings being applied.
Make this optional and add a Save button to permanently store the current configuration.

Change-Id: I077c560f9e71cab16a74247e2e9d87523c0ed85e
Reviewed-on: https://code.wireshark.org/review/9058
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-23 18:27:44 +00:00
Gerald Combs d7b286c794 Qt: Be less aggressive about reselecting packets.
Don't reselect the current row in redrawVisiblePackets. That routine is
called in quite a few places, including ones where we don't want to
automatically scroll to the current packet.

Change-Id: Ia29a832235c0e260d8b17f1ce76745047700537b
Reviewed-on: https://code.wireshark.org/review/9064
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 18:23:12 +00:00
Gerald Combs 1dc608a05e Morph ProgressBar into CaptureProgressFrame.
Switch from a plain QProgressBar to a QFrame with a QProgressBar and a
stop button.

Add a stop_flag boolean to the capture_file struct.

To do:
- Start adding the progress bar to dialogs.
- Don't complain so loudly when the user stops a capture.

Change-Id: Iedd1d7d79f2044f1a53e4fb22186d25930a3ef03
Reviewed-on: https://code.wireshark.org/review/9029
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-23 06:06:37 +00:00
Peter Wu 5ab45709d6 gtk,qt: Fix minor buffer underrun
Avoid accessing the first byte before an empty dirname. No idea why this
was not triggered before. Reproduced with an empty Wireshark profile and
wireshark and wireshark-qt.

Caught with ASAN.

Change-Id: I44f8fdab03ad0f24e663df63a1c54567996a3dfc
Reviewed-on: https://code.wireshark.org/review/9037
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-22 22:54:19 +00:00
Gerald Combs df352c535f Use StockIcon to load toolbar icons.
StockIcon loads each available icon size.

Change-Id: Ia5604cc11ed8350e7f4f782312939cf30c94f548
Reviewed-on: https://code.wireshark.org/review/9030
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-22 21:05:53 +00:00
Martin Kaiser 2e3629afea fix the interface list in the main welcome screen
when no interfaces are available at startup, the number of columns in
the interface tree is set to 1
when new interfaces become available later, the column number is not
reset to the default value and we end up with an interface list whose
entries are not visible
reset the number of columns each time the interface list is updated

Change-Id: I267c5b47da6d5ae9e7769b1036622f79da4d97f2
Reviewed-on: https://code.wireshark.org/review/8996
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-22 20:55:37 +00:00
Gerald Combs 56880d782d [Automatic update for 2015-06-21]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I266509d729803494666458651ab3ae88cac50a21
Reviewed-on: https://code.wireshark.org/review/9012
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-21 15:09:43 +00:00
Martin Kaiser 77ed0387c6 (trivial) fix a spelling mistake in a comment
Change-Id: I3f9feab57032c8c701c4ea487c0f5acca428d5d9
Reviewed-on: https://code.wireshark.org/review/8995
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-20 23:02:02 +00:00
Alexis La Goutte 4c898c3e74 qt_ui_utils: fix parameter 'glib_string' not found in the function declaration
Only a small typo glib_string => glib_gstring

Change-Id: Ia3ad0a8086f6c1a47065754dee33eff1e0ad770f
Reviewed-on: https://code.wireshark.org/review/8988
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-20 13:45:59 +00:00
Pascal Quantin 9e4b299d2c Qt: remove some compilation warnings
Change-Id: If14d6b46cfb3d42798afdaa0721f9892af93fddc
Reviewed-on: https://code.wireshark.org/review/8981
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-18 21:31:50 +00:00
Gerald Combs 9c28594529 Add a preferences editor frame.
This replaces the single preference editor dialog in the GTK+ UI.

Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5
Reviewed-on: https://code.wireshark.org/review/8966
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-18 00:46:50 +00:00
Gerald Combs 053f792d30 Fix the Qt main window popup behavior.
By default QMainWindow::createPopupMenu shows a checkable list of
toolbars which aren't synced with our actions under the View menu.
Replace it with a version that handles all the main window widgets.

Change-Id: I5f5c23880133e97e815d3bbbf19ea3bacc482096
Reviewed-on: https://code.wireshark.org/review/8958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17 03:53:33 +00:00
Gerald Combs 26dacfc8c3 Qt: Add protocol preferences menus.
Add protocol preferences in the packet list and packet detail context
menus. Note that we need a PreferencesEditorFrame in the main window for
editing numeric and string preferences. For now we just show the prefs
dialog.

Change-Id: Ice0cc8e9bc25963cc14aa47698f042f2a73088d8
Reviewed-on: https://code.wireshark.org/review/8957
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17 01:25:27 +00:00
Gerald Combs d5215c2ef6 Save the wireless toolbar recent settings.
Change-Id: I2b0417b7dae8679e80f30de2cd10c7bb6fdc1dbf
Reviewed-on: https://code.wireshark.org/review/8956
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 19:21:45 +00:00
AndersBroman 7525cacf40 [Qt] Delete generated file config.pri at "clean"
Change-Id: Ia8469a91eebf92bf8349d2507bdfcfdba55da916
Reviewed-on: https://code.wireshark.org/review/8949
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-16 11:23:05 +00:00
Michal Labedzki a1859b7254 Qt: Remove redundant actions from UI file
Change-Id: Ia571844a2729683ef5f9487fca0aa9d5fd09b235
Reviewed-on: https://code.wireshark.org/review/8948
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-16 06:56:57 +00:00
Gerald Combs dd8b7ca992 Check for NL and AIRPCAP defines.
This should hopefully fix compilation on OS X.

Change-Id: I621c92499232dafb6d6db867615baed8dc81eb17
Reviewed-on: https://code.wireshark.org/review/8947
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 05:07:37 +00:00
Gerald Combs ece4b01f21 Add the wireless toolbar.
Add the wireless toolbar to the Qt UI.

Start adding AirPcap support to ui/80211_utils. Add FCS validation
routines to ws80211_utils.

Move a bunch of AirPcap routines that require epan from caputils to
ui/gtk. They were required for driver key management, which we'll
leave to the AirPcap Control Panel in the Qt UI.

Move frequency-utils to wsutil.

Change-Id: I44446758046621d183f5c2ba9f6526bf01e084f1
Reviewed-on: https://code.wireshark.org/review/8910
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-16 03:45:54 +00:00
Gerald Combs 60ab49592b Accept drop events immediately.
Accept drop events before opening our capture file instead after.

Change-Id: I48fe1cd1e3b5e6f7b076aaa0e3a0d035938a5af7
Reviewed-on: https://code.wireshark.org/review/8929
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-15 23:53:27 +00:00
Michal Labedzki 7102a06811 Qt/Bluetooth: Add Devices dialogue
Please found it under Bluetooth menu. It shows all devices found
in logs, not only connected, all that its address can be found in
logs. Show if device is local (in most cases: capturing on it side)
and manufacturer and LMP version what should answer the question what
version of Bluetooth is used by Bluetooth device chip.
Also firmware version.

Change-Id: I32e3b7100cdebcaa850b6541de0ab89dff41c0e1
Reviewed-on: https://code.wireshark.org/review/8901
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-15 05:40:25 +00:00
Gerald Combs 9fb6ec6c89 Qt: Add the ability to show preferences by module name.
Currently unused, but allows feature parity with the GTK+ UI.

Change-Id: I33e0bfb434949aabd75ecd2ed36e696731195542
Reviewed-on: https://code.wireshark.org/review/8922
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-15 02:02:41 +00:00
Gerald Combs f661b3c99e Include QUrl.
It's apparently required by Qt4.

Change-Id: Ic5f32b9acd0a244477b7631bff39b3ed5ba86a39
Reviewed-on: https://code.wireshark.org/review/8918
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-14 18:30:31 +00:00
Gerald Combs d42e0f7f12 Qt: Enable Drag and Drop in the main window.
Change-Id: I446163dd9e1a277118caab2f7296a3605cb23fd5
Reviewed-on: https://code.wireshark.org/review/8917
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-14 18:06:35 +00:00
Gerald Combs 5432151d16 [Automatic update for 2015-06-14]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Id3ff0d609b0a34066c3d23053b8d8bbebfc43070
Reviewed-on: https://code.wireshark.org/review/8914
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-14 15:34:05 +00:00
Michal Labedzki de3997e4d0 Qt/Bluetooth/ATT: Add SaveAsImage option for table
Also remove CopyAll button and move this option to table's context menu,
where "Save as image" is placed.

Change-Id: Ifbdd0c1625f449cb2af33a6cf2de2d282e4c6e6e
Reviewed-on: https://code.wireshark.org/review/8900
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Orynicz <michal.orynicz@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-12 08:50:40 +00:00
Michal Labedzki 3966e51de8 Qt/Bluetooth/ATT: Fix behaviour when capture file is closed
Disable go to frame and control components when capture is closed.
You can only browse data and copy them.

Change-Id: I05aee5eae5f91f39ab3bb942afdf9000d9b86add
Reviewed-on: https://code.wireshark.org/review/8899
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-12 08:49:34 +00:00
Guy Harris 2e76bb466a Use pid_t on UN*X, and HANDLE on Windows, for the process ID.
This avoids type punning; at least with Xcode 7 beta on El Capitan beta,
that produces warnings that get turned into errors.

Change-Id: I57f47455b9630f359828c07c92a190b5cb33816f
Reviewed-on: https://code.wireshark.org/review/8862
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-10 00:30:57 +00:00
Pascal Quantin cc1849b67e Qt: fix a V595 warning reported by PVS-Studio
The 'cur_item' pointer was utilized before it was verified against nullptr.

Change-Id: I46185f24cf5700e2137f6e40bed45575197c36e7
Reviewed-on: https://code.wireshark.org/review/8858
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-09 20:21:29 +00:00
Anders 4e60e8fb39 [MSVC 2015] Use intptr_t for "pointer stored as int" to make MSVC happy.
Change-Id: I5dbbea8527a8bb73b17e5a8a5611c3923d82459c
Reviewed-on: https://code.wireshark.org/review/8852
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-09 14:13:14 +00:00
Gerald Combs 2d863b9782 Add TapParameterDialog.
Split StatsTreeDialog into StatsTreeDialog and TapParameterDialog (its
base class). This more closely matches the GTK+ UI and paves the way for
more statistics dialogs.

Change-Id: I2630385534e829d99724673ade372fcb33200d07
Reviewed-on: https://code.wireshark.org/review/8842
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-08 19:51:34 +00:00
Gerald Combs 7fc302e7a7 [Automatic update for 2015-06-07]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I8051df9353cdce000f3b76229df1b2bf7e6b0d57
Reviewed-on: https://code.wireshark.org/review/8811
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-07 15:08:49 +00:00
Gerald Combs 1736a1bcc6 Clean up stats_tree_presentation.
Remove some unused struct members and accompanying callbacks.

Change-Id: I64d32ddf886038e8f19bc3f88e86c8d7578db648
Reviewed-on: https://code.wireshark.org/review/8779
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-05 21:39:08 +00:00
Pascal Quantin ab6108cbdf Qt: clear Go To Packet text box when opening it
Most of the time you intend to go to a new packet, not to go to the previously selected one.
This makes it consistent with all the editors I have used so far.

Change-Id: Ib0cde3c8361a8c3103dd05d622eaba4ee7deab78
Reviewed-on: https://code.wireshark.org/review/8772
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-05 21:15:51 +00:00
Gerald Combs c2b713c093 Qt: Add the capture and display filter dialog.
Use a single overloaded dialog, similar to the GTK+ UI.

Change-Id: If85db14a7101770f115bef725f5145e0010c518d
Reviewed-on: https://code.wireshark.org/review/8776
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-05 19:19:46 +00:00
Gerald Combs 198ef94073 Don't include cfile.h.
Change-Id: I98bc0d02e23abd32796f15bf28ceef0b6ea56d42
Reviewed-on: https://code.wireshark.org/review/8777
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-05 18:31:34 +00:00
Gerald Combs ec3f923e3e Add the Display Filter Expression dialog.
Changes from the GTK+ UI:
- The display filter is built on the fly with immediate syntax feedback.
- Slightly different layout.
- You can search for fields.

Make the plain SyntaxLineEdit a bit more plain.

Bug: 11128
Change-Id: I06a48cd7b9ba7b9dc193b0199540aede4eb62fa7
Reviewed-on: https://code.wireshark.org/review/8742
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-03 02:27:00 +00:00
Gerald Combs b407e45279 [Automatic update for 2015-05-31]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I596469e49e1831939305178b0ab14b18f9b00d4b
Reviewed-on: https://code.wireshark.org/review/8711
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-31 15:57:43 +00:00
Gerald Combs 118bd7a664 [Automatic update for 2015-05-31]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I5ff709ae337949905bc4151bbbfcbb125eb9f5d3
Reviewed-on: https://code.wireshark.org/review/8707
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-31 15:08:53 +00:00
Gerald Combs 4ba148771b Qt: Always draw a byte view.
When we clear the ByteViewTab add an placeholder ByteViewText.

Change-Id: I9fbcd7e609c084d5724a30f80aa141b59ab1c0a1
Reviewed-on: https://code.wireshark.org/review/8688
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-30 00:05:38 +00:00
Alexis La Goutte 3827c81473 Qt: Add Conversation Filter sub menu
Apply conversation filters using the new color_dissector_filters.[ch]
from g1f03180.

Change-Id: I2e535bb3d5b95fd26226422daf9f83c452a95e3c
Reviewed-on: https://code.wireshark.org/review/3558
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-29 21:25:09 +00:00
Gerald Combs 61cef23486 Use an "Open" instead of a "Save" dialog for UAT prefs.
When selecting a file for a PT_TXTMOD_FILENAME UAT preference, use
QFileDialog::getOpenFileName instead of QFileDialog::getSaveFileName.
This matches current GTK+ behavior and the two preferences that use
PT_TXTMOD_FILENAME.

Add a comment noting that the PT_TXTMOD_FILENAME is Open-only.

Bug: 11027
Change-Id: I29eb056422949eda700d448621e508cf094fd7b7
Reviewed-on: https://code.wireshark.org/review/8678
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-28 21:16:39 +00:00
Gerald Combs e08bc0dd62 Don't warn about overwriting filename preferences.
When specifying a filename preference (e.g. the SSL pre-master secret
log filename) don't warn about overwriting the file. Most of the time
we're reading the file and when we're not (e.g. for the SSL debug log)
overwriting it is kind of the point.

Preference descriptions are plain text. We display them in tooltips as
rich text. Convert them accordingly.

Fixup some of the SSL preference descriptions.

Bug: 11010
Change-Id: I4f1b1f3dd270c01648d9dd52ae20381c3c0d2e37
Reviewed-on: https://code.wireshark.org/review/8665
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-28 02:21:33 +00:00
Graham Bloice 2fde6ffc8f Fix out of tree builds
Stop out of tree builds picking up the in-tree version and config.h

Change-Id: Icadc46cab66db72af2d475eac31b28d0ca10df90
Reviewed-on: https://code.wireshark.org/review/8204
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-25 10:42:59 +00:00
Gerald Combs b18309c07f Qt: Update the status bar when saving.
Plumb in more capture file callbacks. Add common functions for setting
the status bar file information. Add and update code to match the GTK+
status bar behavior.

Make sure we update the capture file length when rescanning.

Bug: 10943

Change-Id: Ie84c7a57ee421d57ba3477f8dde3847aaafa1cd1
Reviewed-on: https://code.wireshark.org/review/8594
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-23 00:31:08 +00:00
Gerald Combs b25faac85d Qt: Add a "[closed]" hint to the packet dialog.
Try to make it more obvious that the file has closed.

Ping-Bug: 11044
Change-Id: I76ae5724316c6fd9e7efdd817c39ac268b7d4dd0
Reviewed-on: https://code.wireshark.org/review/8593
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-22 21:05:47 +00:00
Gerald Combs e9d8769d5b Qt: Don't crash after "Save As".
Rename "stay_closed" to "dont_reopen" to match cf_save_records and its
GTK+ equivalent. Set "dont_reopen" to FALSE when we "Save As", otherwise
we crash on Windows.

Bug: 10904
Change-Id: I4bb10abc230439e10cc55ffbd5595bfbc0a34b6f
Reviewed-on: https://code.wireshark.org/review/8592
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-22 20:05:04 +00:00
Gerald Combs fe7c5ea0c1 Fixup capture filter completion logic.
Don't add the current word to the completion list.

Change-Id: Ia475520092f461c9e7b03f82cc3427585e095162
Reviewed-on: https://code.wireshark.org/review/8577
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-21 19:18:19 +00:00
Gerald Combs a30000a805 Autocompleting "and" and "or" probably isn't useful.
Change-Id: Ia16a02a616fd052eeaa9eceff76bc1b20ee8d82e
Reviewed-on: https://code.wireshark.org/review/8553
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-20 16:21:03 +00:00
Michael Mann feb47cf936 Start exposing the filter field of a tap listener to the RTP GUI APIs.
A tap listener has the ability to apply a filter (typically the display filter).  Add a parameter to RTP GUI API functions to allow them to pass in a filter.

Bug: 996
Change-Id: Ib184dfb023be5d1d24a0d842b4039311426b5293
Reviewed-on: https://code.wireshark.org/review/8468
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-20 11:03:58 +00:00
Gerald Combs af054591c3 Add capture filter autocompletion.
Autocomplete on recent and saved capture filters along with the
primitives in gencode.l in the libpcap sources.

Move common autocomplete code to SyntaxLineEdit.
Change-Id: I0931a6775bacf9c917c294befbbdaade51d19b93
Reviewed-on: https://code.wireshark.org/review/8542
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-20 03:03:58 +00:00
Gerald Combs ea3537fb32 Autocomplete saved display filters.
Add saved display filters to the completion list. Fix a complex filter
completion bug.

Change-Id: I035923882fd8d6232d0b69e464bb1517f261dbd9
Reviewed-on: https://code.wireshark.org/review/8533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-19 19:30:05 +00:00
Michal Labedzki a0569ac1f0 Bluetooth: Remove duplicates by default for ATT Server Attributes dialog
Change-Id: Ic833c800f599eed465eddc3d17ca07bdf3e83aba
Reviewed-on: https://code.wireshark.org/review/8511
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18 07:09:37 +00:00
Gerald Combs ab1743ecbb [Automatic update for 2015-05-17]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ic345ff4e7b46ee43af35ebbdda32ffc25e793c65
Reviewed-on: https://code.wireshark.org/review/8495
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-17 15:07:58 +00:00
Gerald Combs a04a894731 Qt: Stop tapping when the I/O Graph dialog closes.
Add a setCaptureStopFlag function to ProgressBar. Add a stopTapping
function and setCaptureStopFlag signal to CaptureFile. Use the new
plubming to stop tapping when the IO Graph dialog closes.

Bug: 10116
Change-Id: Ic46814eed18933f511d9d1ff37e2e7918741f353
Reviewed-on: https://code.wireshark.org/review/8480
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 21:48:03 +00:00
Gerald Combs a1eb0aaeb3 Qt: Make sure we can fetch ExportDissectionDialog's layout.
Make sure ExportDissectionDialog is a non-native, funny-looking file
dialog so that we can fetch its layout.

Fix and add some URLs while we're here.

Bug: 11122
Change-Id: Icf62f7a436c7ba27ec20f84e7c1af1a5d7c9b949
Reviewed-on: https://code.wireshark.org/review/8479
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 18:14:20 +00:00
Gerald Combs 0ae949643f Qt: Fixup sequence dialog buttons.
Switch from "Save As" + Cancel + OK to "Save As" + Close.

Change-Id: I6f1093965f90fe9cbbfbf053779c05388c897641
Reviewed-on: https://code.wireshark.org/review/8474
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 16:45:42 +00:00
Gerald Combs 76a5465cf0 Qt: Fix packet deselection.
When no packets are selected, clear the related item delegate, packet
detail, and byte view. Also, don't crash.

Bug: 10529
Change-Id: I1f46d0d60d060d517f1ee2f8b5a9124bc1fad00e
Reviewed-on: https://code.wireshark.org/review/8470
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-15 16:07:29 +00:00
Roland Knall 57716e1365 Qt: Implement "Apply as Column" for packet context
Implement the same functionality for "Apply as Column" as it
 exists in the GTK version of Wireshark. Especially for the
 context menu in the packet view panel.

Change-Id: Id25b7797616ff3b3acf7aa920395516c8a4e9bf9
Reviewed-on: https://code.wireshark.org/review/7604
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-15 06:05:01 +00:00
Gerald Combs 7f424b5a55 Pop the display filter status when it loses focus.
Change-Id: I7878fd99f8b773f8c550a6d2416e9e2d44abd321
Reviewed-on: https://code.wireshark.org/review/8466
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 22:41:42 +00:00
Gerald Combs 4ba370e0d4 Don't complete the current field.
Change-Id: If2b16783d08d23df427ac9b9c86984245db56d53
Reviewed-on: https://code.wireshark.org/review/8465
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 22:12:56 +00:00
Gerald Combs 63e94c5af1 Fix display filter completion behavior.
Allow completion for mismatched protocol and filter names.

Change-Id: I1d1e6b8f16d4d2d331b915c199f857835dcc1c53
Ping-bug: 11187
Reviewed-on: https://code.wireshark.org/review/8464
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 22:03:35 +00:00
Gerald Combs 294706a1bf Fix packet list font zooming.
Change-Id: I376fc3b41e9ebbe1353527d8d3bbf8d4b86cc29a
Reviewed-on: https://code.wireshark.org/review/8463
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 18:04:09 +00:00
Gerald Combs 2e7524085c Qt: Apply protocol preferences.
Make sure we call prefs_apply_all when saving preferences.

Bug: 11119
Change-Id: Iacf1e28e69c2aebcbbd7dceaa210c8219663665f
Reviewed-on: https://code.wireshark.org/review/8462
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 16:31:38 +00:00
Gerald Combs 2156413bf9 Qt: Column preference fixes.
Don't call redrawVisiblePackets in PacketList::sectionResized. Otherwise
we trigger the crash in bug 11179. Call recent_set_column_width instead.

Clean up the slots called when column preferences change and when recent
column widths change.

Update our column visibility in redrawVisiblePackets.

Use recent_get_column_width when writing the recent file. columnWidth
doesn't return a valid value when we're not visible.

Bug: 11179.
Change-Id: I34ab93d944b341e42129a1c8ff94ba8f7ad4f5fc
Reviewed-on: https://code.wireshark.org/review/8457
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 15:37:35 +00:00
Gerald Combs 2793069020 Add a comment explaining completion misbehavior.
Note that field name completion won't work correctly if a field's abbrev
doesn't match its protocol filter name. Fixing this is left as an exercise
for the reader.

Change-Id: Ia9b55f20bf58b8252e27506bcce4a0dd71cc199c
Reviewed-on: https://code.wireshark.org/review/8460
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14 15:36:24 +00:00
Gerald Combs 4a37dfc57e Qt: Add the correct column width padding.
When applying recent column widths, add the correct padding in the
right place.

Bug: 11175
Change-Id: I5a6fe7975764ddc5d9024d8839a837579b2bf799
Ping-Bug: 11179
Reviewed-on: https://code.wireshark.org/review/8456
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 20:41:51 +00:00
Gerald Combs 703b5dc48a Qt: Don't set ProtoTree::uniformRowHeights.
Some packet detail items contain multiple lines. Show them, which
duplicates the GTK+ UI behavior. Add a note about adding a custom item
delegate if this affects performance.

Make item labels QStrings while we're here.

Bug: 10225
Change-Id: Ia39320028ecff5fe7fa3e4c09ff37405986b7f6e
Reviewed-on: https://code.wireshark.org/review/8445
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 19:37:58 +00:00
Gerald Combs 84db6a661d Fix an error found by Valgrind.
Change-Id: I9f0adac70129c90b4bf1e678bece6c6b8b8b4b75
Reviewed-on: https://code.wireshark.org/review/8455
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 19:04:51 +00:00
Alexis La Goutte a3666e5e39 QCustomPlot: fix division(or modulo) by zero found by Clang and Coverity (CID 1159170 & 1159171)
Try 2

Change-Id: I10c439ccd4b8e5ac24275332e35fb35ad95b8d1b
Reviewed-on: https://code.wireshark.org/review/8447
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-13 17:38:04 +00:00
Gerald Combs 4c4328e316 Try to avoid duplicate display filter completions.
When adding recent filters to the completion list, skip over items that
look like fields and assume they'll be added further down the line.

Change-Id: Ief1e7aeebf91504becc2e07ba9cad66a90d8c7f3
Reviewed-on: https://code.wireshark.org/review/8453
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-13 16:37:03 +00:00
Gerald Combs 99ca42153b Qt: Display filter completion fixes.
Fixup the logic for adding field names to the list.

Connect our completer activation signal to its slot once, not twice.

Bug: 11187
Change-Id: Ife1879fe05c870094ee31e59dd62e3004f588bfc
Reviewed-on: https://code.wireshark.org/review/8440
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12 22:05:57 +00:00
Gerald Combs a7fcfeaca3 Qt: Add packet list navigation checks.
Add sanity checks to go{First,Last,Next,Previous}Packet.

Bug: 11085
Change-Id: I6c33ea314720935aa1881257e9f32732134eec31
Reviewed-on: https://code.wireshark.org/review/8433
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12 18:39:57 +00:00
Gerald Combs a0046c344d Qt: Expert info → Expert information.
Change-Id: I6cf87a1c63a4b34678667396d836d15766155b1a
Reviewed-on: https://code.wireshark.org/review/8420
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-12 00:17:07 +00:00
Gerald Combs b55d801392 Speed up display filter completion.
Don't loop over non-matching fields. This improves completion performance
considerably on Windows (where it was noticeable).

Change-Id: I7f526fe960c5c41da5ae847b04be25d65ca42bb1
Reviewed-on: https://code.wireshark.org/review/8418
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 23:50:40 +00:00
Gerald Combs 1daf6e9e7b Qt: Provide a hint about the current display filter field.
If the field under the DisplayFilterEdit cursor is valid, push its
description. In the main window this shows up in the status bar.

Change-Id: I7ba1255694941c64aa8cce896283a426b9a69f2c
Reviewed-on: https://code.wireshark.org/review/8413
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 22:23:56 +00:00
Gerald Combs 7ebe97a4b9 Qt: Fix the main welcome banner.
Leave the text empty, otherwise it overwrites "Development Version" at
inopportune times. Remove a QDebug include.

Change-Id: I94060ef69cc3b42dda39adfe34d2c0bfbe564ec2
Reviewed-on: https://code.wireshark.org/review/8407
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 21:02:31 +00:00
Alexis La Goutte 1fa0e72d53 Wireshark (Qt): The lower left status bar reports "Ready to load or capture" when a live capture is active
10947 Qt Wireshark - The lower left status bar reports "Ready to load or capture" when a live capture is active

Reported by Jim Young

Bug: 10947
Change-Id: I7dcd5081194bbeab43fef4d994220ac3ea23f536
Reviewed-on: https://code.wireshark.org/review/8067
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-11 20:21:10 +00:00
Gerald Combs 341f2cee6b Qt: Packet list fixes.
When updating the monospace font, don't apply it to PacketList itself.
On Windows and Linux here it sets the header font as well.

Add the item delegate width to the column size hint. This correctly
resizes column 0 on Windows. It seems to add extra space on OS X and
Linux, unfortunately.

Change-Id: I294cd9868fe00144b896636be65896e8557ab208
Reviewed-on: https://code.wireshark.org/review/8402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 19:24:11 +00:00
Gerald Combs e37ae1000d Use setPlaceholderText in CaptureFilterEdit.
Matches a recent change in DisplayFilterEdit.

Change-Id: I22d0f4a327ecae0e2065302a003037d19162b74d
Reviewed-on: https://code.wireshark.org/review/8401
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 17:26:51 +00:00
Gerald Combs 60803f376b Qt: Add display filter completion.
Add completion to DisplayFilterEdit. Disable autocompletion in
DisplayFilterCombo.

New behavior: If we're at the beginning of the entry "recent" display
filters appear at the top of the list.

Start using QLineEdit::placeholderText while we're here.

Bug: 10923
Ping-Bug: 9254
Change-Id: Ic8dd37768abb83d50d4e6c849bb51095fc3742d2
Reviewed-on: https://code.wireshark.org/review/8360
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-11 16:08:28 +00:00
Evan Huus c01f369b73 qt: minor string change in capture options
Replace "Capture in" with "Enable" for promiscuous mode; the checkbox doesn't
actually affect which interfaces get captured on, which is the way I wanted to
read the old text.

Change-Id: I35dd2c8f9523311cb267515804b1421e50e60e06
Reviewed-on: https://code.wireshark.org/review/8374
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-10 16:17:24 +00:00
Gerald Combs af7bdfcbee [Automatic update for 2015-05-10]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I9ee8a6cb84ceb23340af3562cfa9927357319ee6
Reviewed-on: https://code.wireshark.org/review/8376
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-10 15:07:36 +00:00
Gerald Combs f77e02ccc6 Expert Info dialog.
Show all expert messages in a combined view. Group top-level items by a
(severity, group, protocol) tuple.

Let the user enable and disable messages via a check menu.

Add ProtoTree::goToField and expert_info_t.hf_index. Use them to jump to
what we hope is the afflicted item.

Enable the context menu only if the user has selected a packet item.

Add a free-form search field that matches expert summaries.

This differs from the GTK+ version but hopefully provides a smoother
workflow.

Bug: 10931
Change-Id: Ia12cb7c27cdea1634fa2798fb7e4c1b23bd16ad2
Reviewed-on: https://code.wireshark.org/review/8294
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-08 04:29:59 +00:00
Gerald Combs e55ac64077 Qt: Fix packet list column resizing.
The size hint changes in g5ab8490 broke packet list column resizing. Add
back a way to force the hinting necessary for sizeHintForColumn to work
properly.

Bug: 11067
Ping-Bug: 10924
Change-Id: Icd525200f7a88f2b6d22a3039cda98ad0527239e
Reviewed-on: https://code.wireshark.org/review/8334
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-07 20:15:29 +00:00
Alexis La Goutte 0310c72377 Revert "QCustomPlot: fix division(or modulo) by zero found by Clang and Coverity (CID 1159170 & 1159171)"
This reverts commit b394aa5f1e.

The patch don't fix this issue...

Change-Id: I654933ec4ebebdef840f24ba20162f1f1a5321cc
Reviewed-on: https://code.wireshark.org/review/8332
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-07 12:16:27 +00:00
Roland Knall 5727ebe689 extcap: Implement QT extcap options
Implementing a button in the interface list, to bring up
 the extcap options dialog, as well as a dialog, which will
 be generated depending on the selected extcap options.

Change-Id: I1733dc6a8c1a121089a9c353aff10bc4a53e86de
Reviewed-on: https://code.wireshark.org/review/8224
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-05 09:35:10 +00:00
YFdyh000 800fd17ece Add accesskey to Bluetooth menu
Change-Id: I81e0edf8622579ec711d15077f62c31048837bf8
Reviewed-on: https://code.wireshark.org/review/8282
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-04 09:07:17 +00:00
Gerald Combs 0d6581c152 Add a note about slot naming.
Note that QMetaObject::connectSlotsByName looks for slots which follow a
specific naming convetion, and that manually connected slots should not
use that convention. This isn't obvious and seems to trip people up from
time to time.

Change-Id: I81f05519fcba672dcca8ccd82bbafa4d1559cebf
Reviewed-on: https://code.wireshark.org/review/8279
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-03 18:32:32 +00:00
Roland Knall 812d31122a ext_menubar: Change action name to remove warning
on_actionExternalMenu_triggered() triggered a warning, as no menu
 exists on the automatic UI configuration.

Change-Id: Ic3dc4c2c9e4c95ec4bbea01bd53af9a8c831e0d7
Reviewed-on: https://code.wireshark.org/review/8276
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-03 17:14:28 +00:00
Gerald Combs 3d4646e978 [Automatic update for 2015-05-03]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I4d5f34d1b803d478101ba4a1388ac3d71c641918
Reviewed-on: https://code.wireshark.org/review/8273
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-03 15:07:25 +00:00
Roland Knall 5b1d62c50b ext_menubar: Add pointer to GUI main structure
Add a pointer to the callback, which will provide an enum value,
 for each calling GUI entity, as well as a pointer to the main
 structure for that entity.

 For Qt this can be used for instance, to connect to slots of the
 main instance, to update a calling dialog.

Change-Id: Ifa6b04f868512574de53b6bce507e343f6e219d4
Reviewed-on: https://code.wireshark.org/review/8085
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-27 11:20:52 +00:00
Guy Harris 25fd18a397 Include "config.h" first, even before <glib.h>, as is done in other files.
Also move system and GLib includes before Wireshark includes.

Change-Id: I6636c9fdafb69b6dcf297d4c2632f5e8448e1d93
Reviewed-on: https://code.wireshark.org/review/8207
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-26 21:55:41 +00:00
Gerald Combs 9b5a09aa34 [Automatic update for 2015-04-26]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I431063783434a6f7a9a4f4b8186316ed3f98005b
Reviewed-on: https://code.wireshark.org/review/8199
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-26 15:07:50 +00:00
Gerald Combs daafb9d700 [Automatic update for 2015-04-19]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Id9886f878c4d7422b779f1361fd9f7fcfb315982
Reviewed-on: https://code.wireshark.org/review/8120
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-19 15:08:02 +00:00
Alexis La Goutte b394aa5f1e QCustomPlot: fix division(or modulo) by zero found by Clang and Coverity (CID 1159170 & 1159171)
Change-Id: Iba9317436983bb4b3730be8b80e7b9c107ffc3a9
Reviewed-on: https://code.wireshark.org/review/8112
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-19 05:56:09 +00:00
Gerald Combs 40ce324f4d Set the extcap working directory on Windows.
On Windows, prepend the main program directory to %Path% when spawning
extcap processes. This lets us place androiddump in extcap while allowing
it to locate its DLLs.

Change-Id: I406c47ce71323266d5f14fb596931398464e452d
Reviewed-on: https://code.wireshark.org/review/8057
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-15 20:26:13 +00:00
Roland Knall eeed4d1121 UI: Implementing menus for plugins
Plugins may utilize the tap interface to provide special tools
 or analysis options, not otherwise available in Wireshark, or
 perhaps not allowed to be distributed freely. Up until now, those
 tools either had to start automatically, or could not be started
 at all, or had to be started separately.

 It should be possible, that those tools may be started using a
 menu entry directly from Wireshark. This interface tries to achieve
 exactly that.

 This interface uses a clean interface, which can be implemented in
 any plugin or dissector. Documentation for this has been added to
 README.plugins.

 Separators are only supported for now in the Qt interface, but
 URLs can now be added as a simple item, and the UI will use the
 same methods used for other URL calls to open them.

Change-Id: I170107dafb66f6badaa864d05a9091e5cbbf52c2
Reviewed-on: https://code.wireshark.org/review/7865
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-14 04:00:39 +00:00
Michal Labedzki 9ea521532e Qt: Add option to copy all visible item or selected tree items in Packet Details pane
The idea is allow to copy data from GUI by user,
what is currently case only for tshark.

The first option copy every item from Packet Details that are expanded (visibled).
The second option do the same but start on currently selected item/tree.
(let think about protocols like BT SDP where there is a lot of recursive subtrees)

Change-Id: I19c925d21293ceb8af2167c7d2c1b1b36507124e
Reviewed-on: https://code.wireshark.org/review/8047
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-04-13 15:58:57 +00:00
Pascal Quantin 0c700d8958 Windows: fix generation of PortableApps.com installer
Change-Id: I249268ce21ddfbdc7f149609a950736b4fe2ae07
Reviewed-on: https://code.wireshark.org/review/8036
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-04-12 21:30:54 +00:00
Gerald Combs 5b80ccb434 [Automatic update for 2015-04-12]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Ide45514d6fd320962b642ed7c86bca959f2c58f7
Reviewed-on: https://code.wireshark.org/review/8029
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-12 15:07:24 +00:00
Pascal Quantin 461666bcd1 Qt: fix maximized state apply
Preferences are not loaded yet when we call MainWindow::loadWindowGeometry()
Anyway, prefs.gui_geometry_save_maximized should only be checked when saving preferences (MainWindow::saveWindowGeometry() method) like what we do in GTK UI

Change-Id: I8eb01a5f4f7672fbf5846bc576584e28f72d5e31
Reviewed-on: https://code.wireshark.org/review/7978
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-07 21:03:18 +00:00
Alexis La Goutte 77f87b7a01 Byte view tab (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Remove unused bmask variable

Change-Id: I44613f1d949dbaf8e559b3bfb2196609d821c4f3
Reviewed-on: https://code.wireshark.org/review/7496
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-07 18:34:38 +00:00
Guy Harris 3a87a32a57 See if this squelches warnings when compiling without libpcap.
Change-Id: I29441ff47365e302b0ef6dfd54e94f4bf1def08a
Reviewed-on: https://code.wireshark.org/review/7958
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 22:45:55 +00:00
Guy Harris ba0b348d28 Show a count in the status bar for all captures.
(I'd have said "for non-update-list-of-packets-in-real-time captures",
but that's too long for the holy Git "first line of the commit message
is a summary" rule.)

For non-update-list-of-packets-in-real-time captures, show a packet
count in the status bar.

Change-Id: I31670770e3772e9f772f0c9a6438fc6d053560aa
Reviewed-on: https://code.wireshark.org/review/7957
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-06 21:56:49 +00:00
Gerald Combs ec8ed1511a Use zlib 1.2.8 on Windows.
Change-Id: I3df88b1e891f43cd6b6ed089f6c3d20a942e68bc
Reviewed-on: https://code.wireshark.org/review/7952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-06 21:34:10 +00:00
Gerald Combs d4c8dca5d3 [Automatic update for 2015-04-05]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: If98edeab7a413c33e54fbd579e975da26993a380
Reviewed-on: https://code.wireshark.org/review/7922
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-04-05 16:13:53 +00:00
Guy Harris 8327921a32 Fix another capture_dev_user_pmode_find() call.
Missed by the previous commit.

Change-Id: I0882e2cf7a734f93e59dbfd1aab564a2fd65d316
Reviewed-on: https://code.wireshark.org/review/7917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-04 21:43:53 +00:00
Guy Harris c67bc03355 Let capture_dev_user_pmode_find() say "not found".
"Not found" is different from "found, and false".  Have it return a
boolean "did I find the property" indication and, if it did, supply the
property value through a pointer.

Change-Id: Iaa942ea346410b35e512ff1a3821cbf60c88dfd6
Reviewed-on: https://code.wireshark.org/review/7916
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-04 21:03:34 +00:00
Alexis La Goutte a5b51d5a82 TX: Update translations (Manual sync 2015-04-03)
Change-Id: I8f7860707fea0bfb6b2ff36fb445cf4e91917e06
Reviewed-on: https://code.wireshark.org/review/7890
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-04-03 10:37:48 +00:00
Michal Labedzki c164534b7e Qt: Add Capture Restart feature
Change-Id: Ied33dd43bb16660aec7063ddf81982ee48226e9e
Reviewed-on: https://code.wireshark.org/review/7737
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-04-01 07:30:45 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Guy Harris 1b4120846e Centralize the code to set the active_dlt value for a device.
We were doing it similarly, but not the same, in several places; make a
common routine for it.

Have that code check to make sure the DLT_ value in question is actually
supported by the device; if not, pick the first supported DLT_ value, if
any; this keeps it from, for example, picking a bad DLT_ value if your
defaults were set based on monitor mode being on but monitor mode
actually being off, or vice versa.

Change-Id: I1722bfeaf60429bc5c6f665fdea3d466052b13bd
Reviewed-on: https://code.wireshark.org/review/7795
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-23 00:00:42 +00:00
Guy Harris a1ea3ce81c Fix another call to capture_dev_user_snaplen_find().
Change-Id: I20064f782b7ad8ebffc70322a877d88501d6ef60
Reviewed-on: https://code.wireshark.org/review/7749
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 01:16:55 +00:00
Guy Harris 1fdfee69d6 Patch some memory leaks.
capture_dev_user_descr_find() and capture_dev_user_cfilter_find() return
g_malloc()ated strings; we don't need to g_strdup() them to get a
g_malloc()ated string, and we *do* need to free them if we aren't going
to use them any more.

Document that while we're at it, and give more details for the functions
returning integer user-specified interface parameters as well.

Change-Id: Icf98a48992b1c4168ead54bdc4cc2847da89d665
Reviewed-on: https://code.wireshark.org/review/7745
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:28:40 +00:00
Guy Harris ab45f1d290 Unused parameters are done differently in C++.
Change-Id: If6324e7ee57156e067c2584b80df835620f94ac0
Reviewed-on: https://code.wireshark.org/review/7744
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-19 00:24:39 +00:00
Gerald Combs 04f6b557b7 Add a comment.
Change-Id: I82d31ce4435f1c136e158a007c9d4507e47a73a6
Reviewed-on: https://code.wireshark.org/review/7743
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-19 00:02:11 +00:00
Guy Harris 096e5231ff Fix parsing of interface properties strings.
The first entry in the list does not have a leading comma, so a strstr()
for ",{ifname}(" will not work.  Instead, use g_strsplit() with a comma
for all of the preferences.

Have common code for all the "uncomplicated" preferences.  Have a
specialized handler for the one "complicated" preference.

Change-Id: I2144a98ab0cb70db56eaaba88175d6e03885de2a
Reviewed-on: https://code.wireshark.org/review/7741
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-18 23:58:54 +00:00
Michal Labedzki e6f3da96f8 Qt: Fix recent files threads
Fix crash and memory leak. Please not that
Recent File Status objects and threads still
continously grow and shrink memory usage, but do not
grow continuously.

Bug: 10893
Change-Id: Icc8b7fefd6572b902ac81d22e5f7b16e304fcf16
Reviewed-on: https://code.wireshark.org/review/7699
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-18 08:51:55 +00:00
Michal Labedzki 4e82b9c7de Qt: Start address resolver timer
Change-Id: Ic3de3db089f25d9fdfd6100f916b3960e52046f0
Reviewed-on: https://code.wireshark.org/review/7715
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-17 22:00:43 +00:00
Guy Harris 6637f4d144 Fix "Save All" for Export Objects.
Fix the loop that goes through all the objects to be saved so that it
looks at all the objects to be saved rather than repeatedly looking at
the first object.

When letting the user select a directory in which to save, restrict them
to looking at directories.

QDir doesn't do what we actually want here - QDir.setCurrent() might do
a chdir() but it doesn't appear to set the QDir's path, so when we use
it to construct pathnames it constructs them based on
wsApp->lastOpenDir() rather than the directory the user selected.  Use
Boring Old GLib's g_build_filename(), as we do in the GTK+ version, for
now.  (It also does something we *don't* want, namely, at least as the
documentation implies, a chdir().)

Bug: 11062
Change-Id: I705292dc2713b9dba615b0d59a4cf8313f357d82
Reviewed-on: https://code.wireshark.org/review/7720
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-17 18:47:30 +00:00
Michal Labedzki 80939682f9 Qt: Fix overloaded CPU
QTreeView also use timerEvent() to do something... so call its overloaded
method and make CPU happy again.

Bug: 11035
Change-Id: I405c8c2763ae0b96c0483aedcb314a5f259e76a1
Reviewed-on: https://code.wireshark.org/review/7696
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-15 18:50:20 +00:00
Michal Labedzki bed6816879 Qt: Sort names in DecodeAs dialog
This should increase user experience.

Change-Id: Id2713e7c5af8ca0f0d87e3ae52542b4f189ace9a
Reviewed-on: https://code.wireshark.org/review/7681
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-15 13:38:10 +00:00
Alexis La Goutte 9babe6b6b5 TX: Update translations (Manual sync 2015-03-14)
Change-Id: I1aca20f4fd091db5d835d1ee12123a5f7cafe08d
Reviewed-on: https://code.wireshark.org/review/7680
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-14 17:49:15 +00:00
Michal Labedzki 77d9a059fe Qt: Fix DecodeAs
Previously DecodeAs neither save its changes nor changes dissector tables.
Do that and redissect packets to refresh view.

Bug: 10553
Change-Id: Icd8453c9650f0265852f6b6b58bc483b35570a15
Reviewed-on: https://code.wireshark.org/review/7676
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-14 14:26:17 +00:00
Gerald Combs 2ef72cb7aa CMake: Add a top-level nsis_package target.
Add packaging/nsis/CMakeLists.txt and use it to generate each NSIS include
file. Add macros to generate packaging-related targets and invoke them
from the top-level CMakeLists.txt.

Add a top-level "plugins" target. Copy plugins to "plugins" in each of
our staging directories instead of "plugins/$VERSION".

Add missing files to the copy_data_files and copy_cli_dlls targets.

Add all files in the NSIS package from the staging directory.

Drop a bunch of no-longer-needed defines, e.g. MSVC_VARIANT.

Change-Id: Ib1079260d164c65118050f1431af8e582cd577fa
Reviewed-on: https://code.wireshark.org/review/6459
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-12 22:47:42 +00:00
Gerald Combs 8bae919a5d One check mark for ACKs, two check marks for dup ACKs.
Add FT_FRAMENUM_ACK and FT_FRAMENUM_DUP_ACK and set them for
tcp.analysis.acks_frame and tcp.analysis.duplicate_ack_frame. Draw a
single or double check mark in the packet list accordingly.

These are probably specific to TCP, but as it happens there are a lot of
TCP packets.

Change-Id: I35416506419159a79ad8cc2e35f8a14485edfb7e
Reviewed-on: https://code.wireshark.org/review/7568
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:47:17 +00:00
Peter Wu ad1b3ee110 Qt: enable autoscroll on initial capture start
The capture timer was never enabled on capture start or disabled on
capture stop. This is now implemented.

Bug: 10601
Change-Id: Iae23a952986a2c5dddf92b6ac0d1f1bc1c83719c
Reviewed-on: https://code.wireshark.org/review/7582
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:33:56 +00:00
Gerald Combs 5ab8490088 Qt: Allow multiple lines in the packet list.
Remove the setUniformRowHeights(true) call in the PacketList
constructor. This means that the packet list now calculates its height
by querying the Qt::SizeHintRole for every item instead of simply
multiplying item_height * number_of_rows.

Implement SizeHintRole in PacketListModel::data so that size
calculations aren't unbearably slow. We don't have any row text until an
item is drawn (via DisplayRole), so items with multiple lines end up
being rendered twice. Note where we make assumptions on line heights.

Although we call gtk_tree_view_set_fixed_height_mode() in the GTK+ UI we
don't have this problem there. GTK+ is apparently less strict about
enforcing row heights.

Bug: 10924
Change-Id: I98e9f4f5f321c2e03f18498e0a7e7556f88792a1
Reviewed-on: https://code.wireshark.org/review/7430
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 16:29:58 +00:00
Gerald Combs cac102eee3 Change a lot of http:// URLs to https://.
Most of our sites are now HTTPS-only. Update URLs accordingly. Update
other URLs while we're at it. Remove or comment out dead links.

Change-Id: I7c4f323e6585d22760bb90bf28fc0faa6b893a33
Reviewed-on: https://code.wireshark.org/review/7621
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-10 19:30:50 +00:00
Alexis La Goutte 296bb23697 ui uitls (Qt): fix parameter 'val' not found in the function declaration [-Wdocumentation]
Change-Id: I5fb1afca4b412697c56d80a8eb7be4140cd9420f
Reviewed-on: https://code.wireshark.org/review/7612
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-10 07:21:25 +00:00
Gerald Combs 44dbae72ba ProtoTree: Fix crashes.
Don't dereference a null pointer. Remove g_assert()s copied from ui/gtk.
This fixes problems mentioned in bug 11044 but not the bug itself.

Change-Id: Iab75ab5cc6a184c8145a094b1c529a634e3c1c0d
Ping-Bug: 11044
Reviewed-on: https://code.wireshark.org/review/7610
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-09 21:33:29 +00:00
Peter Wu 6bc138c87a Qt: fix heap use-after-free wrt. data sources
When a different packet is changed, the packet scoped memory for tvbuff
is freed before clearing data source tabs. This results in
heap-use-after free when resizeEvent is called as a result of clearing
tabs for data sources.

Avoid resize events by hiding the tabs.

Caught with ASAN:

    ==18816==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060004cd970 at pc 0x7fffebf46618 bp 0x7fffffffbb10 sp 0x7fffffffbb00
    READ of size 4 at 0x6060004cd970 thread T0
        #0 0x7fffebf46617 in tvb_captured_length epan/tvbuff.c:423
        #1 0x773062 in ByteViewText::updateScrollbars() ui/qt/byte_view_text.cpp:489
        #2 0x76f307 in ByteViewText::resizeEvent(QResizeEvent*) ui/qt/byte_view_text.cpp:197
        ...
        #24 0x9f2348 in ByteViewText::~ByteViewText() ui/qt/byte_view_text.h:46
        #25 0x9f23f5 in ByteViewText::~ByteViewText() ui/qt/byte_view_text.h:46
        #26 0x76b9d6 in ByteViewTab::clear() ui/qt/byte_view_tab.cpp:54
        #27 0x5de685 in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:477
        ...

    freed by thread T0 here:
        ...
        #5 0x53d763 in cf_select_packet file.c:3827
        #6 0x5ddfa5 in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:454
        #7 0x7fffe58ec980 (/usr/lib/libQt5Widgets.so.5+0x3bc980)
        #8 0x7fffe4d55dd6 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) (/usr/lib/libQt5Core.so.5+0x23fdd6)
        ...

Change-Id: I9c1c01398713389de58259d13ebbaddd2d6e5c52
Reviewed-on: https://code.wireshark.org/review/7589
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 21:56:42 +00:00
Peter Wu 758ee3dc89 Qt: fix use of uninitialized variable
Fixes error reported by UBSan:

    ui/qt/packet_list.cpp:537:13: runtime error: load of value 190, which is not a valid value for type 'bool'

The method is apparently called earlier for other timers, resulting in
an error on startup. Initialize rows_inserted_ to avoid warnings when
the event is triggered later.

Change-Id: Iad919d79264ff1c3c17c9458c869d584234fcd5d
Reviewed-on: https://code.wireshark.org/review/7575
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-03-08 21:54:52 +00:00
Gerald Combs 54c301a0d6 Add the @2x expert indicators.
We currently load the expert indicator resources using an <img> tag.
According to QTBUG-36383 the @2x versions won't load unless you've built
with Qt 5.4.0 or later.

Change-Id: I003fd5d5f10e779f2e7ca6ba9fbb8e033df85b80
Reviewed-on: https://code.wireshark.org/review/7601
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 18:12:06 +00:00
Gerald Combs 29f7c7af7d Update the expert indicators.
Add @2x versions. Remove expert_ok. It appears to be unused.

Change-Id: If36f839f622e235334a4237a9c5424c15a9945bc
Reviewed-on: https://code.wireshark.org/review/7594
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 16:18:48 +00:00
Gerald Combs 87c0df36c8 Qt: Paint elided LableStack text by hand.
Change-Id: I9481598f59531c219a20209429e6ff876ba50cf0
Reviewed-on: https://code.wireshark.org/review/7591
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-08 16:16:30 +00:00
Martin Kaiser 1a572019fe Revert "[Qt translations] create the .qm files during the build"
This reverts commit 7d01a84d0e.

cmake doesn't get the dependencies right if the .qm files are gone
I'll work on this off-line and resubmit it as one commit rather than
trying to approach this step-by-step

Change-Id: Ibbd60163f910adbd571b3df2a980d64dbf1ea924
Reviewed-on: https://code.wireshark.org/review/7596
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-08 12:18:12 +00:00
Martin Kaiser 7d01a84d0e [Qt translations] create the .qm files during the build
create the .qm files from the .ts files at compile time
for now, this works for autotools only

don't fail if Qt's lrelease tool is not available,
skip building the .qm files in this case

Change-Id: I869a6dc8220eb03e7ffc8bfdb2b6f3930f6cac72
Reviewed-on: https://code.wireshark.org/review/7460
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-07 18:26:12 +00:00
Peter Wu 56a903608c Qt: fix CPU hogging due to status bar
http://doc.qt.io/qt-5/qwidget.html#updatesEnabled-prop says:

    "Re-enabling updates implicitly calls update() on the widget."

This results in an infinite paintEvent series, hogging the CPU. Updating
the text twice does not seem to be a bad idea after all...

Change-Id: Id6cd733e68512f6963fc7d70d91859ca88ab8d38
Reviewed-on: https://code.wireshark.org/review/7581
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-07 16:55:57 +00:00
Guy Harris 5e67ae78ba Get rid of an unused structure member.
Change-Id: I2941bb7e6dc0fce3e1256af6e5e19d2997de5801
Reviewed-on: https://code.wireshark.org/review/7573
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-07 04:41:09 +00:00
Gerald Combs 394d23ed7b Qt: Automatic scrolling shouldn't select the last packet.
If packet_list_moveto_end does anything it should scroll, not select. Make
it a no-op for the time being.

Change-Id: I149815c8f9e50e95a4a77b91b7582c44eed6db4b
Ping-Bug: 10601
Reviewed-on: https://code.wireshark.org/review/7564
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-06 20:21:22 +00:00
Gerald Combs df8b1a0154 Qt: Fix a couple of resource leaks found by Coverity.
Change-Id: Ic3156d8afc2fa237407f3893c34672b1306866fa
Reviewed-on: https://code.wireshark.org/review/7420
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-06 04:05:26 +00:00
Gerald Combs 8664de017f Qt: Constify a bunch of strings.
Change-Id: I601e429408fc042fc5b18a4750d40e260da47f43
Reviewed-on: https://code.wireshark.org/review/7535
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 20:17:29 +00:00
Alexis La Goutte 9076bf3119 Qt: Display only filename on status bar and display full path and size on tooltip
Ping-Bug: 10949
Change-Id: Ic735afdb7994a4c10b527217327831138362ffc9
Reviewed-on: https://code.wireshark.org/review/7538
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 16:57:31 +00:00
Gerald Combs f2b35a180f Qt: Add extra related packet indicator types.
Add the ability to set frame number types: none, request, or response.
Use the types to draw different related packet indicators in the packet
list.

Track the conversation in PacketListRecord. Use it to draw dashed lines
for unrelated frames.

Set frame number types for DNS and ICMP.

Instead of drawing a transparent QImage, alpha blend our foreground
color and draw directly in our painter. Blend more toward the foreground
color.

Add FRAMENUM_TYPE to checkAPIs.

Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214
Reviewed-on: https://code.wireshark.org/review/7436
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 16:45:04 +00:00
Alexis La Goutte 3948d82872 TX: Update translations (Manual sync 2015-03-05)
Change-Id: I7469fbfa799dae5857c6f0df710438f28d77f43a
Reviewed-on: https://code.wireshark.org/review/7505
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Uli Heilmeier <openid@heilmeier.eu>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-05 15:26:46 +00:00
Gerald Combs ce3ec6a6f7 Qt: Redraw the packet list when a column is resized.
...otherwise the packet list and header columns don't match until
the next redraw.

Change-Id: Ice9c17c93badec93839be7c100ca27d8dc493daa
Reviewed-on: https://code.wireshark.org/review/7536
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 02:08:59 +00:00
Gerald Combs 0a4f93ab2b Qt: Show the full file path in the status bar.
Add file_size_to_qstring and use it to show the file size. Add a
"shrinkable" property to LabelStack. Make the info status shrinkable.
Elide text so that long file paths don't widen the main window.

Change-Id: Ieb1caaf7e016384609d41fcabaa63d8f7a293eff
Bug: 10949
Reviewed-on: https://code.wireshark.org/review/7534
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05 00:49:11 +00:00
Martin Kaiser 5c2810eb21 build the list of .qm files from the list of .ts files
(2nd attempt: yesterday's builbot failure wasn't caused by this commit)

Change-Id: If87d6b55cc733ff35a3677860b4559a7082a15b2
Reviewed-on: https://code.wireshark.org/review/7502
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-03 11:41:36 +00:00
Michael Oed 599dd4ffcc Qt: Do not close file while trying to open new one
Wireshark QT will close current opened file when popup open dialogue (File -> open), instead of keeping current file opened till new file is to be opened

Bug: 10962
Change-Id: I2062514ae648c95492e0160953c80d5303b8aba2
Reviewed-on: https://code.wireshark.org/review/7452
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-03 07:37:54 +00:00
Alexis La Goutte 6878122187 Main window (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ia8d37b33ee30f09cfe5e0cd00820d84e171deb1c
Reviewed-on: https://code.wireshark.org/review/7494
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-02 19:02:43 +00:00
Alexis La Goutte 0ebbb60279 Byte view text (Qt): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I507b27bbf3c2877517cc9613ada1b182becfa98f
Reviewed-on: https://code.wireshark.org/review/7495
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-02 19:02:24 +00:00
Guy Harris 99ceab898c Don't create a packet dialog if we don't have a packet.
Move the "find the frame" stuff to openPacketDialog(), and don't even
bother creating a new PacketDialog if we don't find the frame.  This
should squelch Coverity CID 1270934, by giving up quickly if fdata is
null.

Change-Id: I4605ba7e271a55724f02cafed4122f9dd9b1b6f7
Reviewed-on: https://code.wireshark.org/review/7467
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-02 04:01:43 +00:00
Gerald Combs 51f45af2b8 Qt: Don't autoscroll if we're not capturing.
Change-Id: I3164d8a12981970f127cd68adb7e52f2a1fe5c39
Reviewed-on: https://code.wireshark.org/review/7457
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-01 21:17:50 +00:00
Martin Kaiser 85c589f9d0 Revert "build the list of .qm files from the list of .ts files"
This seems to break the build on OSX 10.5 (?)

This reverts commit b46bd2c7798d1c9e808625250928b40adf11a8bb.

Change-Id: I720de7182804c5c669934e3514e789f2da066867
Reviewed-on: https://code.wireshark.org/review/7459
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-01 18:40:44 +00:00
Martin Kaiser a3c6003a90 build the list of .qm files from the list of .ts files
Change-Id: If87d6b55cc733ff35a3648860b4559a7082a19b0
Reviewed-on: https://code.wireshark.org/review/7458
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-03-01 17:46:58 +00:00
Michal Labedzki 2d4817966e Qt: Automatically scroll the packet list.
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the
View menu in the GTK+ UI but it seems to make more sense as a navigation
item.

Use a timeout interval for automatic scrolling. I haven't run any tests
to see if this makes a difference but it would seem that the less
drawing we do during a high speed capture the better, particularly for
remote displays.

Update the x-stay-last icons.

Note that we might want to make prefs.capture_auto_scroll a "recent"
setting.

Mark auto_scroll_live and packet_list_check_end GTK+ only.

Bug: 10601
Co-authored-by: Gerald Combs <gerald@wireshark.org>
Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d
Reviewed-on: https://code.wireshark.org/review/7292
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-27 20:27:14 +00:00
Gerald Combs 8ae714da5b Remove a dead assignment found by Clang.
The code in question was copied from ui/gtk/capture_file_dlg.c. The dead
assignment there was removed in 68ceffe.

Change-Id: I605f181b623fbd87ab41505d30a79d7a4fe649df
Reviewed-on: https://code.wireshark.org/review/7419
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-26 18:23:34 +00:00
Gerald Combs 3e5c0bffa2 Qt: Fix packet detail and byte view scrolling
Make sure we call scrollToByte ByteViewText::setFieldHighlight.
Explicitly scroll to our selected QTreeWidgetItem in
ByteViewText::mousePressEvent.

Bug: 11013
Change-Id: I0a6381f6760ed48a4f496be8a06b1e56faa5a05b
Reviewed-on: https://code.wireshark.org/review/7416
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-26 17:22:43 +00:00