Commit Graph

3122 Commits

Author SHA1 Message Date
Gerald Combs 47e1798762 Qt: Byte view and proto tree fixes.
Select our byte field only when we enter marked / locked mode.

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

Don't clobber the current index in saveSelectedField.

Change-Id: I967b20608f991a5f3e6a0979b1f702f874ce27b4
Reviewed-on: https://code.wireshark.org/review/25521
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-31 04:54:36 +00:00
Stig Bjørlykke 55e74ba841 Qt: Write recent before applying profile changes
The selected profile may be renamed in apply_profile_changes()
so write the recent file before renaming the directory to ensure that
we reload the latest changes.

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

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

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

Change-Id: I7ec15a556579afe968a06a36d7914aa1631666df
Reviewed-on: https://code.wireshark.org/review/25507
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-30 17:17:19 +00:00
Gerald Combs 9d87994b67 Byte view: Mark bytes using an outline.
Distinguish between hovered and marked bytes using a lighter and heavier
outline. Remove the "mark" color definitions.

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

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

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

Change-Id: I63aed7c3d0da3d9829d410d75fc18daa4049c0ca
Fixes: v2.5.0rc0-1822-g73c01d6d05 ("Qt: Rewrite the About dialog to use models")
Reviewed-on: https://code.wireshark.org/review/25470
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-26 05:25:57 +00:00
Peter Wu 9be01dc616 Qt 4.8 compatibility fixes
Add missing include headers, define Q_NULLPTR for all Qt objects (to
avoid having to include an ugly compat header), use old signal/slot
syntax (Q_SIGNALS are protected in Qt 4.8), disable Qt 5 log message
handler, etc.

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

Change-Id: I2bfe502df4339c28d8c88553419b7d4d412a2be2
Reviewed-on: https://code.wireshark.org/review/25461
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-25 09:05:07 +00:00
Alexis La Goutte ccd2b53f40 byte_view_text (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ibfaac5e1d8cc30d6bb8917d0c0e10a79e059a53e
Reviewed-on: https://code.wireshark.org/review/25452
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-24 16:48:18 +00:00
Gerald Combs 00a528f123 Qt: Translate files in subdirectories.
Make sure we pass ui/qt/*/*.{cpp,h} to lupdate. Make update-tx a
bash script and make sure it passes ShellCheck. Add a -n flag, which
disables pushing back to Transifex.

Change-Id: Ia7d6564bbdbf69285f1f9b88cde09e37da4f916c
Reviewed-on: https://code.wireshark.org/review/25382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-21 20:16:58 +00:00
Gerald Combs 145e3a5dc3 Qt: Proto tree fixes
Make sure ProtoTree::toString stops at the right place.

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

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

Bug: 14355
Change-Id: Id89be9911aa14dbbb52725f7203ac26a747c42fc
Reviewed-on: https://code.wireshark.org/review/25376
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-21 14:20:17 +00:00
Gerald Combs 3efcc9bd53 Qt: Create byte views at the proper zoom level.
Add a zoomed argument to WiresharkApplication::monospaceFont so that we
can easily fetch the font at its current zoom level. Set the zoomed font
when we create new ByteViewTexts.

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

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

Include the leading when applying formats.

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

Change-Id: Icc992e085e96e328ed4ed247271f75ddd69637bc
Reviewed-on: https://code.wireshark.org/review/25381
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-19 19:22:12 +00:00
Dario Lombardo 804c4b1653 Qt: add sanity check in InterfaceTreeCacheModel (found by clang).
Change-Id: I8f73254d8ac4b560937431b592a81ad726ce43a9
Reviewed-on: https://code.wireshark.org/review/25370
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-19 16:45:27 +00:00
Dario Lombardo 24cd7a9a1f Qt: remove leak from PathChooserDelegate (found by clang).
Change-Id: I71d73c8464450f8cbc655f8f99f54bd34eddd344
Reviewed-on: https://code.wireshark.org/review/25374
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-01-19 14:53:17 +00:00
Gerald Combs 682fe39422 Qt: Fixup a cast.
Change-Id: I25dbf6c91bd3ca1f16a01c937a3830010adcd197
Reviewed-on: https://code.wireshark.org/review/25373
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-18 18:56:16 +00:00
Dario Lombardo c5560babbd Qt: return if cf_read_record() fails in PacketDialog (found by clang).
Change-Id: I5187b378db9bae092052ce50b337f266e08e4332
Reviewed-on: https://code.wireshark.org/review/25340
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-18 15:48:30 +00:00
Guy Harris 3a93855b05 Make apply_profile_changes() return a non-const pointer.
It returns a pointer to a g_mallocated string, which the caller has to
free, so its return value shouldn't be a const pointer.

Change-Id: I76f288379a5c1eff580c391bdc9019ab7fe8f336
Reviewed-on: https://code.wireshark.org/review/25364
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-18 07:33:42 +00:00
Gerald Combs 0bb501a655 Qt: Fix bits highlighting in the byte view.
When the byte view is set to "Show bytes as bits" make sure we highlight
all eight bits instead of just two.

Change-Id: I1ece65032fa32f7274f4e7383e538b92e8fa4f65
Reviewed-on: https://code.wireshark.org/review/25354
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-18 05:20:01 +00:00
Gerald Combs 0aad2bbc36 Qt: I/O graph fixes.
Use Qt::DecorationRole when setting and getting a color and
Qt::CheckStateRole when setting and getting the check state of UatModel
items.

Add a default role for UatModel::data.

Convert between value strings and their respective values where needed.

Bug: 14317
Change-Id: Idd3eb773dc9944f982f6dbd7d49f73f4a60dd5a2
Reviewed-on: https://code.wireshark.org/review/25355
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
2018-01-18 05:16:18 +00:00
Gerald Combs d1254247b7 Qt: ByteViewText hover fixes & updates.
Add back field highlighting during hover.

Instead of marking hovered bytes using an underline+overline, draw a
border rect.

Change-Id: I574dd074cfa021ac0dec3cdea6c5f9b0b4da6d0e
Reviewed-on: https://code.wireshark.org/review/25348
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-17 11:37:49 +00:00
Dario Lombardo d77d5c9d20 Qt: add more sanity checks in utils (found by clang).
Ensure the pointer exist before dereference them.

Change-Id: I7c2881c9c74b88517d01d9306507c14ff2a7b257
Reviewed-on: https://code.wireshark.org/review/25345
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-16 18:56:11 +00:00
Gerald Combs 107a91a8cc Qt: Fix proto tree links and related frames.
Add FieldInformation::isLink and use it to style link items.

Add back a related frame information.

Get rid of rowsInserted() and just visit each tree node starting from
the root.

Change-Id: I0e7ef6b2e11d25465705adffbb77d6f6cfb2a435
Reviewed-on: https://code.wireshark.org/review/25342
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-16 18:55:24 +00:00
Gerald Combs 6b2764a41e ProtoTree behavior fixes.
Sync our expansion state for every node since we might have mixed
expanded/collapsed hierarchies.

Move the prefs.gui_auto_scroll_on_expand code from expand() to its own
function (autoScrollTo()).

Rename expand() and collapse() to syncExpanded() and syncCollapsed().
We can update tree_is_expanded without overriding our base class.

Ping-Bug: 14340
Change-Id: Ibf758809ea26dcc3f79bd0201168fae35d7cce8d
Reviewed-on: https://code.wireshark.org/review/25328
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-16 05:27:55 +00:00
Dario Lombardo ef7d5daf42 Qt: add assert to avoid null dereference (CID: 1427426).
Change-Id: Ib3a5830a4ae07ebb9bd2657599d668af03c896c8
Reviewed-on: https://code.wireshark.org/review/25275
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-15 15:43:34 +00:00
Dario Lombardo 282436a762 Qt: rename index to tab_index to pacify checkAPI.
Change-Id: Ib171c835ca1e2a3b00ac6d6d495b41c70084b52f
Reviewed-on: https://code.wireshark.org/review/25325
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-15 12:21:11 +00:00
Dario Lombardo 43833239fc Qt: change obsolete qVariantFromValue into QVariant::fromValue.
Change-Id: I767b06c0e316347cdb28b769f1032e6d44cba45b
Reviewed-on: https://code.wireshark.org/review/25321
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-15 12:20:32 +00:00
Michael Mann 56a991710b Bugfix VoipCallsDialog tap handling
voip's special tap unregistering should be happening when
WiresharkDialog unregisters its taps.

Change-Id: I8f28b1ed31617b47870cb7a429d43f52fb8c4a86
Reviewed-on: https://code.wireshark.org/review/25294
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-15 09:46:01 +00:00
Gerald Combs 2f31016e6c Qt: Expand subtrees when a packet is selected.
ProtoTree::rowsInserted was expanding top-level items properly but not
subtrees. Make sure we do so.

Bug: 14340
Change-Id: I6c73fd09643b52d43014352816d0dd4838dbcb1d
Reviewed-on: https://code.wireshark.org/review/25316
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-15 08:41:23 +00:00
Michael Mann 6b4d1cf931 InterfaceFrame: don't use pointers for models
Change-Id: I6d41ba89006abb8f8e703f6d703370169062f7e9
Reviewed-on: https://code.wireshark.org/review/25285
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-14 22:19:12 +00:00
Stig Bjørlykke 57230a2e8c Qt: Reword text shown when no interfaces displayed
Change-Id: Ic5ba4e562fe031b95fd2a7ab2d86de9bc09d5311
Reviewed-on: https://code.wireshark.org/review/25300
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-14 08:33:41 +00:00
Gerald Combs 7bf0620eb5 [Automatic update for 2018-01-14]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ie096b93a5c9476d763fb6677d0d9ab54c3c4744c
Reviewed-on: https://code.wireshark.org/review/25306
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-14 08:16:05 +00:00
Stig Bjørlykke bd857b6a9c Qt: Use the text "Initializing external capture plugins"
Change-Id: Ic46dc0220722bf6ae3af857dcdac83d451772262
Reviewed-on: https://code.wireshark.org/review/25301
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-13 18:12:54 +00:00
Stig Bjørlykke 55553f1a38 Qt: Don't use the term "extcap" interfaces in UI
Use the term "external capture interfaces".

Change-Id: I216ce2273737b58e4922c476416333ba16d6cb30
Reviewed-on: https://code.wireshark.org/review/25298
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-13 13:44:25 +00:00
Dario Lombardo 554d3c9cd2 Qt: fix compilation without pcap.
Change-Id: If4ee4908b66a05fba1dba653ba887caa559aa7c2
Reviewed-on: https://code.wireshark.org/review/25288
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-01-12 23:03:11 +00:00
Gerald Combs 3fb92333ae Qt: Add some translation hints.
Add translation hints for the PrefsModel names.

Change-Id: I003bea668cdb3340182227722cef42f7007bba1e
Reviewed-on: https://code.wireshark.org/review/25287
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-12 20:43:06 +00:00
Roland Knall 42100cb868 Qt: add info for extcap disabled in main window.
Add an item to the end of the interface list, if the extcap
interfaces have been disabled.

Change-Id: I2643efb5dda9045e9e00fa3f815014f26a78085f
Reviewed-on: https://code.wireshark.org/review/25218
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-12 17:23:46 +00:00
Roland Knall ac9c89de65 Qt: Add InfoProxyModel
Add an identity model, which can be used to display non-selectable
information at the end of any list

Change-Id: Iaca436f34cb8e5b251eb0dc00ea2c0ce1bd9e0e2
Reviewed-on: https://code.wireshark.org/review/25280
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-12 12:49:14 +00:00
Dario Lombardo f942ad09f6 Qt: add initializer (CID: 1427425).
Change-Id: Id476db10688f8b06bf6e8499a6e011f8605c66c0
Reviewed-on: https://code.wireshark.org/review/25276
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-01-12 10:08:23 +00:00
Gerald Combs 690f1c3c40 Qt: Adjust About box column sizing.
Setting column sizes when we resize will clobber any adjustments made by
the user. Set them when we show the dialog instead. The plugin text
varies quite a bit from column to column. Resize each column to its
contents instead of setting uniform widths.

Change-Id: I1ed9b115665b4dd99a4ff9ee94701f449b8413de
Reviewed-on: https://code.wireshark.org/review/25250
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-11 15:16:54 +00:00
Alexis La Goutte 2aa8260957 wireshark_preference (Qt): fix extra ';' outside of a function is a C++11 extension [-Wc++11-extra-semi]
Change-Id: Ided4470e26f67f82fc90244560603e97b1d4d4b5
Reviewed-on: https://code.wireshark.org/review/25265
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-11 15:16:38 +00:00
Dario Lombardo 7c6f5c9172 Qt: refresh interfaces on exit if extcap status has changed.
Change-Id: I113f5ae3d72f647ddf0783dd4bcbdf42715dcbdc
Reviewed-on: https://code.wireshark.org/review/25223
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-10 08:12:15 +00:00
Michael Mann 3f2f16411f Convert GUI layout preferences to use preference effects.
Another simple example of how to use preference effects to limit
the times a capture file is redissected unnecessarily.

Also clean up some of the grammar of preference effect descriptions.

Change-Id: I2db92e8e3ee913d3b37162916bd0ef7ac8ecd794
Reviewed-on: https://code.wireshark.org/review/25175
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09 13:09:18 +00:00
Dario Lombardo 22b5ffad86 extcap: add preference to prevent interfaces loading.
Change-Id: Ia5865a40c75e582f28408a0515c5c0b38e43a916
Reviewed-on: https://code.wireshark.org/review/25188
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-09 09:58:48 +00:00
Guy Harris af0f49e80d Use pcapng as the name of the file format.
At one point, I remember a discussion resulting in the official name of
the next-generation replacement for pcap format being changed to
"pcapng", with no hyphen.

Make Wireshark reflect that.

Change-Id: Ie66fb13a0fe3a8682143106dab601952e9154e2a
Reviewed-on: https://code.wireshark.org/review/25214
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-09 00:38:51 +00:00
Michael Mann c53412f7db Bugfix the sort order of protocols in Preference dialog.
Sort properly by module title.

Also consolidate some of the searching in PrefModuleTreeView.

Change-Id: I5312581c63f8626de08bd9f03613219b34bf968a
Reviewed-on: https://code.wireshark.org/review/25176
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08 09:08:42 +00:00
Dario Lombardo e80b40adbe extcap: remove conditional compilation.
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9
Reviewed-on: https://code.wireshark.org/review/25186
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08 05:50:15 +00:00
Gerald Combs f5f6ceeb66 [Automatic update for 2018-01-07]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I65801bc1440f64c28ee003e23be2ca528bc1adc8
Reviewed-on: https://code.wireshark.org/review/25178
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-07 08:16:08 +00:00
Michael Mann 603bb5097d Set captures preferences for PREF_EFFECT_CAPTURE.
This is a simple example of changing preferences that don't
affect dissection to something else, so that changing them
doesn't cause a file to be redissected unnecessarily

Change-Id: I77c64c739e8bbc9f2a202f744f27cb07be4a822b
Reviewed-on: https://code.wireshark.org/review/25173
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-07 00:06:21 +00:00
Martin Mathieson 2941018a72 WLAN stats: make filter + apply button work
Also export as text just the networks.
Change-Id: I228d65cb219792a70c6077932dbe9cf65b92eb6e
Reviewed-on: https://code.wireshark.org/review/25169
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-01-06 23:27:00 +00:00
Michael Mann eef3c8434d Add ability for preferences to determine what they can change.
Add flags field to preference structure to help determine what
areas of Wireshark are affected by a preference changing.  The
intent is to be able to distinguish dissection from GUI or other
changes that are not dissection.

The default is to have all preferences affect dissection, but their
flags can be changed.  This patch doesn't change any flags from the
default.

Change-Id: Ied5ae961bc3f33f5b730b2892fff3fa0898380b8
Reviewed-on: https://code.wireshark.org/review/25171
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-06 17:49:23 +00:00
Pascal Quantin 5a5d9348b0 wireshark_preference.cpp: rework comments to please MSVC2015
Change-Id: Ic7a1f51df833e8aec7555f796e9a86f1d120cdc1
Reviewed-on: https://code.wireshark.org/review/25165
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-01-05 17:12:33 +00:00
Roland Knall 3b64fc008f Qt: Fix windows version of Preference Dialog
Initializing a static member on Windows C++ has to be done differently.

This fixes the segfault introduced with Ia611ec192dcc1ad638a997182cec1ab5bdb7859c

Change-Id: Ib7a9840feda74830f835345c666f57e23e9e4e0b
Reviewed-on: https://code.wireshark.org/review/25163
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 15:14:42 +00:00
Michael Mann 1a07d97fd7 Qt: Add manager for preference dialog
Abstract out the different types of preferences into a visitor
and factory pattern to handle the preference dialog.

Change-Id: Ia611ec192dcc1ad638a997182cec1ab5bdb7859c
Reviewed-on: https://code.wireshark.org/review/25142
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-05 11:13:21 +00:00
Stig Bjørlykke 1e16be7556 Qt: Bring back correct profile_status font size
The refactoring in ga79b7986 did not preserve the font size
for the profile name in the status bar.

Change-Id: If38224a43043dd572992836b6fe78f1829f9cccd
Reviewed-on: https://code.wireshark.org/review/25159
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-05 11:10:21 +00:00
Gerald Combs 3b2e999813 Qt: Byte view recent updates.
Add a recent.gui_bytes_encoding preference and use it for the byte view
encoding as requested in bug 14044.

The recent.gui_bytes_view preference is an enum, so make it one.

Bug: 14044
Change-Id: Ibc40721c29465aca1940467e41d71e9dd2485e71
Reviewed-on: https://code.wireshark.org/review/25147
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-05 06:52:13 +00:00
Gerald Combs 0f3aa8522e Qt: Move sized toolbar images to stock_icons.
The sized (WWxHH) icons in the toolbar directory aren't limited to
toolbars. Create a "stock_icons" directory and move them and their
related SVGs there.

Change-Id: I2c1852499594aa738371c79542f24bd3351653bb
Reviewed-on: https://code.wireshark.org/review/25133
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 03:27:15 +00:00
Michael Mann dbe9be2f06 Qt: Cleanup cases where QTreeWidgetItem is no longer used
Change-Id: Ib2b6d4f73a6c9f1dacb728f6275a240487a73a02
Reviewed-on: https://code.wireshark.org/review/25149
Petri-Dish: Michael Mann <mmann78@netscape.net>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 03:26:54 +00:00
Michael Mann dce8682e10 Qt: Reexpand dissector table and enabled protocol trees when dialog is searched.
If search text ends up with no results, the tree is cleared.  When the search
text is removed, it results in all but main leaf being collapsed.  Restore
the search tree to its default state after any search text has been entered.

Change-Id: Id7d1a4fcb4355c6e2551cf3dfd300e26bf683ca3
Reviewed-on: https://code.wireshark.org/review/25148
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-04 23:50:38 +00:00
Michael Mann d239da264c Convert preference dialog to use more models.
Convert Advanced view and Modules view to use a single base model,
loading the preferences once and then filter and display what they
need with QSortFilterProxyModel derived classes.

Convert the PreferencePane "types" to just strings.  This allows
a more straightforward relationship between the "special" modules
that need custom widgets for preference manipulation and it also
removes dependency on preferences_dialog.h for many files.

Change-Id: I091deb3061564aa4d1564e9ca1c792715961b083
Reviewed-on: https://code.wireshark.org/review/25134
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04 21:20:59 +00:00
Roland Knall a79b7986cd Qt: Redesign profile menu in status bar
Remove global variables and move menu to where it is created.
Additionally exchange LabelStack with ClickableLable, as it
was overkill.

Change-Id: I04528b707e9e491d0dd43063f5a47b08dfdb3471
Reviewed-on: https://code.wireshark.org/review/25140
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04 15:33:10 +00:00
Dario Lombardo ba3830e03b Qt: add conditional compilation in switches.
Compiling without pcap, the lack of all the cases causes an error.

../ui/qt/main_window_slots.cpp:756:13: error: enumeration values 'Capture',
'Update', and 'Fixed' not handled in switch [-Werror,-Wswitch]
    switch (ev->captureContext()) {
            ^
1 error generated.

Change-Id: I36c0bc854b1d864ebf54ac59ca15743918bc7d2b
Reviewed-on: https://code.wireshark.org/review/25127
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-01-04 13:20:26 +00:00
Gerald Combs 1e05c57cca Qt: Fix capture file properties averages.
Round our average packet sizes to the nearest whole number as described
in bug 9836 and change 687.

Change-Id: I842eca7650d19be66eb35c40a886bd591a86650d
Reviewed-on: https://code.wireshark.org/review/25129
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04 11:57:50 +00:00
Stig Bjørlykke d1fe22d14e Qt: Use switch/case in MainWindow::captureEventHandler
Change-Id: I765667465e08ec51a107edbee3c2026a52cacb74
Reviewed-on: https://code.wireshark.org/review/25117
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-03 11:15:15 +00:00
Stig Bjørlykke a382ed35fe Qt: Fix CaptureEvent::Reload event handling
Fix an error introduced in signal/slot redesign in gd5d81518.

This error disabled all capture file menu items after doing a rescan,
like when adding a display filter.

Change-Id: Ib468051c15b9f1a15faa2ed07b958340b82a662b
Reviewed-on: https://code.wireshark.org/review/25116
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-03 09:37:32 +00:00
Roland Knall d20629e0f0 Build: Fix Ubuntu moc build
Includepaths for moc where not correctly applied

Change-Id: I1e3df133736372f3e4139957dc2e426f51764c86
Reviewed-on: https://code.wireshark.org/review/25108
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-02 10:59:26 +00:00
Gerald Combs 6f84e1b5f3 Qt: Fixup fieldSelected behavior.
Check the originating sender of fieldSelected in a couple of places so
that we don't re-emit it. This fixes an issue that was keeping the byte
view from marking the protocol.

Remove duplicate signal+slot connections in MainWindow.

Remove an unused member function.

Change-Id: Ia876bb4117d1e30a56f4c335a65f6976c8058f9d
Reviewed-on: https://code.wireshark.org/review/25077
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-31 08:48:22 +00:00
Gerald Combs f930710585 [Automatic update for 2017-12-31]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I38b0274b93baf3e2d307827f04960f4bf7407842
Reviewed-on: https://code.wireshark.org/review/25080
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-31 08:16:15 +00:00
Dario Lombardo 5bdd333240 Qt: add check after cast.
CID: 1396367.
CID: 1373059.

Change-Id: Icf47537608166ccd7c2028b71c0169d3469da9c0
Reviewed-on: https://code.wireshark.org/review/25043
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:38:23 +00:00
Dario Lombardo c7c5e2abb1 Qt: handle a failed open file the right way (CID: 1159174).
Change-Id: Ia639a4b530cc9fdf7b72887031bc029c065d2162
Reviewed-on: https://code.wireshark.org/review/25048
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:35:41 +00:00
Dario Lombardo 727fac4559 Qt: remove unneeded check (CID: 1415729).
base_graph_ is always set in the constructor.

Change-Id: I760e26a612458c15b47cd5381a6b7eb284b2cdf4
Reviewed-on: https://code.wireshark.org/review/25041
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:29:13 +00:00
Dario Lombardo d5f0157c09 Qt: add initializers (CID: 1412975).
This commit completes change I5a161a98a90efb7dda95646c4f025c34623b0327,
incomplete by mistake.

Change-Id: I5236a8cd86b4955e5605c234bc04f832ff3e4f47
Reviewed-on: https://code.wireshark.org/review/25070
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 20:25:45 +00:00
Gerald Combs d089cca16b Qt: Miscellaneous translation hints.
Add QT_TR_NOOP and comments in a few places.

Change-Id: I77c964a4be463aa61de73fdd6af43623edc55474
Reviewed-on: https://code.wireshark.org/review/25051
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-29 14:15:21 +00:00
Michael Mann ead32b5628 Populate Remote Interfaces with data from recent file
Remote Interfaces have been saved in the recent_common file however
they were never populated by the GUI.

Bug: 8557
Change-Id: Ib68a75ce02f5b5e2c115b72d58c3e781a5122f9f
Reviewed-on: https://code.wireshark.org/review/25039
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-29 07:44:37 +00:00
Dario Lombardo 2677b07073 Qt: check preference existence.
CID: 1159290
CID: 1159292
CID: 1159290

Change-Id: I7c4218f3aa67a2eaea5b052c751cb8757bcd168d
Reviewed-on: https://code.wireshark.org/review/25047
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 01:39:20 +00:00
Dario Lombardo 422f1c0fb1 Qt: check return value of strtok() (CID: 1372271).
Change-Id: I588ecf79f53181af8ca48c5b32de54437d6275d3
Reviewed-on: https://code.wireshark.org/review/25044
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-29 01:33:17 +00:00
Dario Lombardo f8670a96c8 Qt: use QVariant::String instead of QMetaType::QString.
They both have the value 10, but the checks are run against methods
that return a QVariant::Type, then is formally more correct to use
that. This also removes the need for a cast.

CID: 1323929.
CID: 1311958.
CID: 1268202.
CID: 1268201.
CID: 1238868.

Change-Id: I792c0e3b70b0f181867648d8f47a02c675200b10
Reviewed-on: https://code.wireshark.org/review/25036
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-28 15:31:46 +00:00
Roland Knall b9341ad2d9 Qt: Fix moc interface issue
moc has an issue with interfaces defined in classes, where also other
Qt objects are being defined. At least in some versions for Qt, this
may lead to the interface declaration not being found

Change-Id: Id143311322086abe23085d2482957ec330ae67c8
Reviewed-on: https://code.wireshark.org/review/25032
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-28 12:31:24 +00:00
Roland Knall e3329cdc31 Qt: Remove duplicate copy actions
Remove the final copy actions from MainWindow and use DataPrinter instead.
This way, MainWindow no longer is involved in copying data, and the actions
purely are defined by DataPrinter

Change-Id: Ib70ad6394dee501bb2c8d58c9d174a0eb04b47de
Reviewed-on: https://code.wireshark.org/review/25031
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-28 11:26:25 +00:00
Martin Mathieson 25425839cf LTE stats: trivial changes after review
Change-Id: Ibcb755440180fc761a547de55d14c3fdc32973de
Reviewed-on: https://code.wireshark.org/review/25024
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-28 07:36:19 +00:00
Alexis La Goutte 9715aff0bd capture_file(.h): fix commas at the end of enumerator lists are a C++11 extension [-Wc++11-extensions]
Change-Id: I64c9fdefcf72add83944a6c38d5aa4e42dbaacb9
Reviewed-on: https://code.wireshark.org/review/25017
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-27 22:50:12 +00:00
Michael Mann e65ce97f1a Add template helper for simple Qt tree models
Provide template class for data item of a tree model that has
simple parent/child relationship and can handle the APIs necessary
to navigate between parent/children.

Also provide template class to shim between QAbstractItemModel
and inherited class to handle "tree navigation" API.  It's not
supported by Qt 4.8, so hold off on actually using it.

This saves a bunch of typing and enforces type safety.

Change-Id: I431dee73625f5335b45fe9c6e4c2973932860ad8
Reviewed-on: https://code.wireshark.org/review/24988
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27 19:28:22 +00:00
Gerald Combs e641846837 Qt: Add "Copy as…" to the byte view.
Make ByteViewText an IDataPrintable and add "Copy as…" context menu
actions. Remove some unused functions.

Bug: 14276
Change-Id: Ie48c7c9b016de19fd8978397d03d23e9a7fe247a
Reviewed-on: https://code.wireshark.org/review/24933
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27 18:19:10 +00:00
Michael Mann 777acc73da Apply new CaptureEvents to statistics dialogs.
Refactoring from If366d42b07dc822636404ac44ba2306ec4418b4e ignored
dialogs outside of the main window.  Searched for removed signals
from CaptureFile class and applied new CaptureEvent handling.

Change-Id: I9e0aaa0dc1c702ce04810d27c8f9273997f7ca30
Reviewed-on: https://code.wireshark.org/review/25007
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27 08:08:10 +00:00
Michael Mann cb7eef8ff8 Convert Export Objects dialog to use a model.
Change-Id: I4be2c83755be95ab0deec15f066dd3e89b96a240
Reviewed-on: https://code.wireshark.org/review/25005
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-27 03:13:38 +00:00
Guy Harris 5153a7aba2 Don't close something we didn't manage to open.
Addresses Coverity CID 1426950.

Change-Id: I5e47d1ede0ed8a56597fe71dad5a3e48191a0ad8
Reviewed-on: https://code.wireshark.org/review/25003
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-26 19:42:04 +00:00
Martin Mathieson 540cdaf54c RLC Stats: SaveAs working for all columns
Note that when the iterator was used for the items within
the tree (in TapParameterDialog::getTreeAsString()), the
last 2 items/headers were not being seen.  Don't know why,
but when instead iterate by index, all column headers
are visible.

Change-Id: Ib5f38d1af0ecbefd400041584ba1d59d235dcbd1
Reviewed-on: https://code.wireshark.org/review/24969
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-26 12:03:32 +00:00
Martin Kaiser 971333665c qt: follow stream: use the new CaptureEvent signal
The signals related to capture events were refactored recently. Adjust
the follow stream dialogue to use the new CaptureEvent signal instead of
the now removed signal CaptureFileClosing.

Filter for context==file, event==closing in the signal handler.

Change-Id: I2d75b424fbf0a6734b0290aa205dd3d0c1ce053f
Reviewed-on: https://code.wireshark.org/review/24980
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-26 12:02:58 +00:00
Dario Lombardo b8ea5eb69d Qt: remove unneeded check.
CID: 1402186.
CID: 1402182.

Change-Id: Icaae5e8b0459a4df751e08f45ce3f461a21499e8
Reviewed-on: https://code.wireshark.org/review/24993
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-26 09:25:33 +00:00
Dario Lombardo 340fc6f08a Qt: rework ByteViewText::addFormatRange to avoid dead code (CID: 1426074).
Change-Id: I8341a6106cd38118f0bf1bdb87aa87cc90e89eee
Reviewed-on: https://code.wireshark.org/review/24966
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-25 03:09:25 +00:00
Gerald Combs c7ce426f84 [Automatic update for 2017-12-24]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ia4acffe0372de93476cb677b1859509cec39216a
Reviewed-on: https://code.wireshark.org/review/24974
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-24 08:10:41 +00:00
Michael Mann 386f354f87 Add Service Response Time dialog for SCSI.
SCSI requires parameter data to be passed into the tap.  Provide
a new dialog that can handle SCSI commands.

Bug: 14144
Change-Id: I4561f251ec38753a28befee33b8b994b04b92230
Reviewed-on: https://code.wireshark.org/review/24955
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-24 06:53:41 +00:00
Dario Lombardo c2dee33630 Qt: add initializer (CID: 1412975).
Change-Id: I5a161a98a90efb7dda95646c4f025c34623b0327
Reviewed-on: https://code.wireshark.org/review/24965
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-24 06:36:33 +00:00
Martin Mathieson c60d7bb199 LTE RLC stats: supply fields for Save As..
Also use double rather than float for bandwidth
calculations.

There is an issue where TapParameterDialog is not showing
the last 2 column headings - most likely because
2 of the column headings are not used by UE entries
(only channel entries).  Will investigate after this.

Change-Id: I3f691990b723434176060916153786665034b8d1
Reviewed-on: https://code.wireshark.org/review/24960
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-23 18:36:44 +00:00
Roland Knall d5d815189d Qt: Redesign signal/slot concept of capture_file
This is in preparation to make it easier for other classes
to get the right signals from the capture file. Also the decision
on what signals to listen to now resides with the final classes,
not main window, and it no longer needs to be changed if the
statusbar or wsapp needs additional signals.

Change-Id: If366d42b07dc822636404ac44ba2306ec4418b4e
Reviewed-on: https://code.wireshark.org/review/24941
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-23 09:41:46 +00:00
Dario Lombardo 8a83e4d9ea Qt: close file exiting from scope (CID: 1418343).
Change-Id: Ie54fcf5c16f98addd512ef8efcfadfebac56177a
Reviewed-on: https://code.wireshark.org/review/24954
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-23 01:13:50 +00:00
Michael Mann 54f6df525e RPC Service Response Time dialog: Fix crash
There were a few use-after-free situations.  Fix one by using epan API
to get program name for tap structure.
tap structure shouldn't be deleted because it's needed.  Will be freed
by the tap reset/free function.

Change-Id: Ia18d84340362839926036c777106ca1c6d1b18f5
Ping-Bug: 14141
Reviewed-on: https://code.wireshark.org/review/24950
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-23 01:08:31 +00:00
Dario Lombardo 8a961e8e15 Qt: add missing break (CID: 1426884).
Change-Id: I2fb495ca59ca5f6a659287f7140328f8850f732b
Reviewed-on: https://code.wireshark.org/review/24944
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-12-22 16:23:00 +00:00
Pascal Quantin 4bba969698 byte_view_text.cpp: add initializers to please GCC 7.2.1
Even if a code review suggests that they are not required, it silence 2
compiler warnings.

Change-Id: I9ea45dd6759275dd8a2b8fc48fc41d0a9cecbcc2
Reviewed-on: https://code.wireshark.org/review/24942
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-22 14:18:08 +00:00
Gerald Combs 9354901dd1 Qt: Lighten non-printable byte view characters.
Draw non-printable characters using a lighter foreground color in the
byte view.

Change-Id: Ib97a1f9f897fa6f78e33ff80c7efea21f68ef2d5
Reviewed-on: https://code.wireshark.org/review/24935
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-22 13:05:35 +00:00
Martin Mathieson cf9d7fb8a5 LTE MAC stats: save to file, ue entries only
Change-Id: I25f3b1b793861aeb066739290db5e9ebd0e0b596
Reviewed-on: https://code.wireshark.org/review/24934
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-22 09:32:50 +00:00
Gerald Combs 46a35e5004 Qt: Add back byte view hover.
Add back the byte view hover behavior. Draw an overline+underline when
hovering to make it a bit less distracting and to make hovered vs marked
modes more obvious. Update names to match.

Change-Id: I554d1cad98199f08f1c19796b14d158ad41706b4
Reviewed-on: https://code.wireshark.org/review/24932
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-21 22:06:57 +00:00
Roland Knall 57d54a2fc0 Qt: Filter Dissector tables properly
Also cleanup the code a little bit

Change-Id: I53097478fafa46249fa6ecb52508d9bc5b963caa
Reviewed-on: https://code.wireshark.org/review/24908
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-20 19:42:11 +00:00
Stig Bjørlykke 153d588972 Qt: Improve ColumnEditorFrame stretching
Use more free space in the ColumnEditorFrame for the Fields entry.

Change-Id: I6bdf2c6ce187dbd2aae08da00d99bda683dc5970
Reviewed-on: https://code.wireshark.org/review/24907
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-12-20 19:40:40 +00:00
Gerald Combs 6d38bc00db Qt: Fix DataPrinter hex conversions.
Add casts so that we call the unsigned version of QString::arg. We
aren't modifying the byte array and want to avoid deep copies so
constify it.

Change-Id: I2dcdeeab87bb0f810ffd4d36d41d1e47256d487e
Reviewed-on: https://code.wireshark.org/review/24901
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-20 14:10:31 +00:00
Stig Bjørlykke 0b30fb239f Qt: Add new keyboard shortcuts
Add Ctrl+Shift+I for "Apply as Column"
Add Ctrl+Shift+O for "Show Packet Bytes"

Also added "Show Packet bytes" to the "Analyze" menu.

Change-Id: I03e39bf92c254cf33bef73b1356ad576c92241d2
Reviewed-on: https://code.wireshark.org/review/24906
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-12-20 08:39:47 +00:00
Michael Mann 8521dbbe67 Convert Dissector Tables dialog to use model
Now with searchability!

Change-Id: I6ab4e89d4080d3599d522807d39de80cc46e7360
Reviewed-on: https://code.wireshark.org/review/24898
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-19 21:00:24 +00:00
Stig Bjørlykke c781cc38fd Qt: Avoid using cmd+H as keyboard shortcut on macOS
The keyboard shortcut Ctrl+H (cmd+H) is used on macOS to "Hide Wireshark".
Change shortcut for "Export Packet Bytes" to Ctrl+Shift+X.

Change-Id: I2d39911f83bc2aaf20930cda303741fa89738767
Reviewed-on: https://code.wireshark.org/review/24895
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-19 20:24:50 +00:00
Michael Mann 1bdececdb2 Fix some copy/paste errors with new models.
Change-Id: Ic018fafece38ef0e49321ef9ea5351848d5dd486
Reviewed-on: https://code.wireshark.org/review/24899
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-19 20:15:44 +00:00
Dario Lombardo 106e0b4ee0 Qt: add initializers (CID: 1426703).
Change-Id: Ib75685a099449672b55d63b647fd0f579ad1e5f6
Reviewed-on: https://code.wireshark.org/review/24893
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19 14:12:21 +00:00
Roland Knall 4db038aa28 Qt: Fix sorting of enabled protocols description
Change-Id: Ifa7b6e61927615c342839b6c2e7d012198a5f939
Reviewed-on: https://code.wireshark.org/review/24892
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-19 09:54:59 +00:00
Michael Mann 0d6eb9631f Convert Enabled protocols dialog to use model.
Change-Id: I618df2f2608adcd1be5da02262c5296e4d86cfba
Reviewed-on: https://code.wireshark.org/review/24866
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-19 08:21:19 +00:00
Stig Bjørlykke 7cb6255f17 Qt: Resolve duplicate keyboard shortcuts
Two Edit->Copy methods are using the same keyboard shortcut as other
functionality:

1. Ctrl+Shift+D is used for "Copy this item's description" and
   "Ignore All Displayed packets"

2. Ctrl+Shift+F is used for "Copy this item's field name" and
   "Reload as File Format/Capture"

Resolve this by changing the Copy methods to use Ctrl+Alt+Shift as modifier.
Add a keyboard shortcut for "Copy all visible items" while here.

Change-Id: I0d963501055e63963d93e211f592aa9e82801d3c
Reviewed-on: https://code.wireshark.org/review/24884
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19 04:47:42 +00:00
Stig Bjørlykke 9f7b8713fa Qt: Add Collapse Subtrees
This item is missing from the Qt port.

Change-Id: Iacc18a7c2eb2368d6566622788a4e900868d446e
Reviewed-on: https://code.wireshark.org/review/24879
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-19 04:46:49 +00:00
Gerald Combs 3c87991c28 -1 is a valid tree_type value.
Adjust tree_expanded and FieldInformation::treeType accordingly.

Change-Id: I9b12c28550ba2639f636531a7ea1841df0638b5e
Reviewed-on: https://code.wireshark.org/review/24844
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-18 04:28:06 +00:00
Gerald Combs 9761e27939 Qt: Process our event loop less often at startup.
Add back info_update_freq_ and use it to skip event loop processing.

Change-Id: Id36b4786c5ff1458abbf12f4e9ded13c56e14d57
Reviewed-on: https://code.wireshark.org/review/24876
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-18 04:25:34 +00:00
Gerald Combs 50be2bde1a Qt: Handle RecentFileStatus destruction manually.
Restore the "deleteLater" behavior removed in 889aacae6e so that we
don't trigger an assert in debug builds.

Move the itemStatusFinished connection to RecentFileStatus while we're
here.

Bug: 14279
Change-Id: I79bc74d77fb3ad970c7c8a71037f680d55eac47c
Reviewed-on: https://code.wireshark.org/review/24875
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-17 23:59:43 +00:00
Gerald Combs f37e759f41 [Automatic update for 2017-12-17]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ideac9831381dbf6411af0e1d8bfa4fef6a1d7769
Reviewed-on: https://code.wireshark.org/review/24867
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-17 08:17:00 +00:00
Gerald Combs 889aacae6e Qt: Update our recent status sooner at startup.
Update our recent file status as soon as we read recent_common.

Run recent stats updates in the global thread pool.

Revert 15a97b5986 since it's no longer needed.

Change-Id: If1b08ea640dfcad26affab5d20c80c90fbf133f2
Reviewed-on: https://code.wireshark.org/review/24862
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 08:04:03 +00:00
Martin Mathieson cd573915ea LTE RLC graph: export graph as image, like TCP stream does
Change-Id: I8709f7c09528a44a9729a06ea2ba4d6f99dbeccb
Reviewed-on: https://code.wireshark.org/review/24864
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 08:02:34 +00:00
Martin Mathieson f4b2263a0b Simple statistics export: fill in callback to get item data
Bug: 13942

Change-Id: Ie7d13b1c17083d0a5b98282f04e6ac30319352a7
Reviewed-on: https://code.wireshark.org/review/24853
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-17 07:59:42 +00:00
Michael Mann 0b88544b07 Fix memory leaks in Expert Info dialog
Models and children weren't deleted which leaked memory all over the place.

Change-Id: I961016b2501ad8cc8c75cf5fa5b0c86756a29382
Reviewed-on: https://code.wireshark.org/review/24858
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16 15:41:21 +00:00
Michael Mann 68668b785c Convert Supported Protocols dialog to use model
Also have search file search name, filter and description columns

Change-Id: Id519c5b1deb4a80e3b95437cf2e6d3e9510e4b11
Reviewed-on: https://code.wireshark.org/review/24857
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16 15:20:50 +00:00
Martin Kaiser b2e6d615c2 qt: follow stream: prevent duplicate close
621498f88e fixed a crash that's caused by
closing the follow stream dialogue multiple times. Another way to get a
similar crash is to press the Back or "Filter out this stream" buttons
again while we're already about to close.

Ignore the two buttons in this case.

Change-Id: Ia8d7b3ca500db2519a784b42c0744e2527b9d5f6
Reviewed-on: https://code.wireshark.org/review/24839
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16 05:21:25 +00:00
Gerald Combs 15a97b5986 Qt: Show our recent files earlier.
Show the recent file list before it's been scanned so that the welcome
screen layout will be complete by the time we're done initializing.

Change-Id: I09f0a68c6d36f30e7cdb2958f82af38f52444c34
Reviewed-on: https://code.wireshark.org/review/24849
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-16 00:31:40 +00:00
Stig Bjørlykke 3071356d9e Qt: A node without a child can not be expanded
Change-Id: I28bb5797e8eab69c761e257b90a11c646d06cf68
Reviewed-on: https://code.wireshark.org/review/24845
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-15 23:56:41 +00:00
Gerald Combs cf5a58f72a Qt: Initialize QFontDatabase in a worker thread.
QFontDatabase uses an internal list of system fonts which might take a
while to initialize depending on your platform and hardware. On my
notebook here it takes about 45 to 50 ms. Create a worker thread for
QFontDatabase initialization similar to QMimeDatabase.

Change-Id: Ieff683b023537a6c104a80f2611ea1e966b65610
Reviewed-on: https://code.wireshark.org/review/24841
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-15 22:07:34 +00:00
Gerald Combs bdb6baa740 Qt: Switch ProtoTree to a treeview+model.
Add a ProtoTreeModel and use it in ProtoTree. This should make the UI
more responsive when we have lots of items in the tree.

Change-Id: Id26e6bcff84663867a8da17fd9ae86ff639b633f
Reviewed-on: https://code.wireshark.org/review/24774
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-15 20:58:14 +00:00
Stig Bjørlykke a51ac8d398 Qt: Fix translating some texts
Change-Id: I8267bfd96efe9d9d086913ff418a74a68e63b8da
Reviewed-on: https://code.wireshark.org/review/24837
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-15 16:48:00 +00:00
Gerald Combs 90102ad12e Remove a plugin_if_gui_cb type conversion.
We always pass a GHashTable * to plugin_if_gui_cb so don't cast it to a
gconstpointer. This should fix the following and related warnings:

main_window.cpp: In function ‘void plugin_if_mainwindow_apply_filter(gconstpointer)’:
main_window.cpp:121:44: warning: cast from type ‘gconstpointer {aka const void*}’ to type ‘GHashTable* {aka _GHashTable*}’ casts away qualifiers [-Wcast-qual]
     GHashTable * data_set = (GHashTable *) user_data;

Fix another const warning while we're here.

Change-Id: Ia9225188bfb913feb4fef4369f10fd5791fc8dc9
Reviewed-on: https://code.wireshark.org/review/24830
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 23:43:38 +00:00
Gerald Combs 629596ebef Qt: Constify a variable.
Change-Id: Icb3ce93d24ffbdf4ac6d3b70e7baa1f991169ac3
Reviewed-on: https://code.wireshark.org/review/24823
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 20:27:09 +00:00
Gerald Combs db740987ff Qt: Add and use qUtf8Printable.
Qt 5.4 introduced qUtf8Printable, a convenience macro for converting
QString to a UTF-8 const char *. Add a compatibility definition and
start using it.

Change-Id: I3cf88611b1ed1a34082cb2ba82394954e2e6c461
Reviewed-on: https://code.wireshark.org/review/24828
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 20:26:52 +00:00
Guy Harris 6d30df0cdd Replace a comma with a semicolon, which it presumably was intended to be.
Change-Id: I308752a50b465a2772172c3500f6417a3ae19f11
Reviewed-on: https://code.wireshark.org/review/24816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-14 02:39:22 +00:00
Gerald Combs c781bd4110 Qt: Fix a cast.
Just use a const_cast instead of messing with compiler settings.

Change-Id: I35d3498ac4c2817d02cbf11497a70f72b60b58bb
Reviewed-on: https://code.wireshark.org/review/24815
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-14 01:08:12 +00:00
Roland Knall 801ee01aff Qt: Add ui, qrc and qm files to source
Autogen had the resulting effect, that IDE's no longer see
those files as part of the source tree, and therefore do not
show them. This fixes it.

Change-Id: Ia1f259743ba5b63f5bc47da79afca90a9fabc07b
Reviewed-on: https://code.wireshark.org/review/24794
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-13 18:19:05 +00:00
Michael Mann b0112e60ad Add a model to use for Expert Info dialog.
With the model (and proxy), the following features were added/fixed.
1. Expert severities can be filtered by type
2. Search filter expanded to include summary, protocol and column info
3. Expert info starts with all items collapsed.
4. Context menus for collapse/expand all

Bug: 11753
Bug: 13831
Bug: 13842
Change-Id: I8e89c7be441e1f08e18915ef8805609e5c5d0bd1
Reviewed-on: https://code.wireshark.org/review/22458
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-13 16:07:07 +00:00
Martin Kaiser 621498f88e qt: follow stream: fix crash during close
The Follow Stream dialogue's button "Filter out this stream" filters out
the stream's packets and then closes the Follow Stream dialogue. This may
take a moment. If the user presses the Close button while the filtering
is still running, the dialogue will be closed twice. This causes a crash
which can be seen in ASAN builds.

==9485==ERROR: AddressSanitizer: SEGV on unknown address 0x60205e80001b (pc 0x7f923e672b8c sp 0x7fff73104600 bp 0x7fff73104600 T0)
    #0 0x7f923e672b8b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d9b8b)
    #1 0x7f924f46010b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x13f10b)
    #2 0x7f924f4655ff in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x1445ff)
    #3 0x7f923e672dca in QCoreApplication::notifyInternal(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2d9dca)
    #4 0x7f924f49ae54 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x179e54)
    #5 0x55f3e249582f in FollowStreamDialog::close() /media/sf_wireshark.git/ui/qt/follow_stream_dialog.cpp:327
    #6 0x55f3e236e534 in FollowStreamDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ui/qt/moc_follow_stream_dialog.cpp:155
...
SUMMARY: AddressSanitizer: SEGV ??:0 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
==9485==ABORTING

Ignore the Close button if we know that we'll be closing the dialogue shortly.

Change-Id: Ibf1684fd75937e6b24fcb9ea62ae6acb038260e6
Reviewed-on: https://code.wireshark.org/review/24777
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-12 12:52:16 +00:00
João Valverde 7617af1d89 Fix make distcheck
Change-Id: I0c5a31d423d19071dc6ed0a42b064271e5f63fd2
Reviewed-on: https://code.wireshark.org/review/24769
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 20:21:09 +00:00
João Valverde 5fc43fe63a Rewrite make-tap-reg.py in C
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a
Reviewed-on: https://code.wireshark.org/review/24756
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 02:52:28 +00:00
Gerald Combs 91548948bb [Automatic update for 2017-12-10]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: If3becbd6b66f0a7a49a80c4ff2dc2a2a6015fa16
Reviewed-on: https://code.wireshark.org/review/24752
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-10 08:16:52 +00:00
Gerald Combs d0d1eaadf0 Win32: Add checks for _WIN32_WINNT and NTDDI_VERSION.
Check to see if we're the source of truth for _WIN32_WINNT and
NTDDI_VERSION in config.h and emit a compiler error if we aren't.

Rearrange the #includes in ui/qt/data_printer.cpp so that config.h is
included first. This fixes the following:

   136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(411): warning C4005: 'NTDDI_VERSION': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
         C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(223): note: see previous definition of 'NTDDI_VERSION' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)
   136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(412): warning C4005: '_WIN32_WINNT': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
         C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(213): note: see previous definition of '_WIN32_WINNT' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)

Change-Id: I90886cb9450463d768d6529ccd678ca11508cde2
Reviewed-on: https://code.wireshark.org/review/24744
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-10 07:50:14 +00:00
Martin Mathieson d96ef7ed05 Allow switching direction in LTE RLC graph
Change-Id: I1681089aebe7f00b2b84ece00c53a3bf8769d50b
Reviewed-on: https://code.wireshark.org/review/24682
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-12-09 13:58:19 +00:00