summaryrefslogtreecommitdiff
path: root/ui/qt
AgeCommit message (Collapse)AuthorFilesLines
2017-05-11Force HAVE_REMOTE to be defined when including pcap.h with remote support.Guy Harris2-0/+26
WinPcap made the mistake of having stuff in its public header fines depend on a configuration #define, HAVE_REMOTE; this means that we need to forcibly define it when building with remote capture support. The tip of the libpcap master branch does not have that botch; hopefully future versions of libpcap-for-Windows will be based on that libpcap and thus lack that botch as well. Defining HAVE_REMOTE in config.h is not the right fix, as it makes it look like a *Wireshark* configuration option that code in Wireshark should test, rather than a *WinPcap* configuration option that the pcap.h that ships with the WinPcap SDK should have been changed, as part of the build process, to correctly define or not, so that users of WinPcap don't have to define it themselves. Change-Id: I62d1eca6d3c900d0dcc9fbc011db77f595a86313 Reviewed-on: https://code.wireshark.org/review/21593 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-08Qt: try harder to find a working monospace fontPeter Wu1-1/+9
QFont::toString returned the default font (which might be unavailable), leading to use of non-monospace fonts in the bytes view. Detect the effective font instead and apply it to avoid this issue. Add additional logic to invoke font detection when the configured font is bad (for example, because of the bug or because a font has been removed in meantime). Bug: 13638 Change-Id: I8a625cf365c90119caebe8c4deada0df7426e53a Reviewed-on: https://code.wireshark.org/review/21551 Reviewed-by: Jörg Mayer <jmayer@loplof.de> Petri-Dish: Jörg Mayer <jmayer@loplof.de> Tested-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Ahmad Fatoum <ahmad@a3f.at> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-07[Automatic update for 2017-05-07]Gerald Combs7-259/+259
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: Iae34b6ae74e4b6f891756732107aa1fdfa9ffa51 Reviewed-on: https://code.wireshark.org/review/21541 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-05-04Qt: Inhibit Disable Protocol when applicableJaap Keuter1-0/+1
The packet details context menu allows you, through the Protocol Preferences sub menu to manipulate (disable) the protocol dissection through the Disable <protocol>... option. This opens up the appropriate dialog and select the applicable protocol. This fails for protocols which have their can_toggle flag reset (e.g. the frame protocol). The dialog opens, but the protocol can't be found, hence the top item is selected. Instead disable the menu option for protocols which can't have their enabled state toggled. Change-Id: Ifa83f656a8ab747f379d3ca0114520e5efed4b67 Reviewed-on: https://code.wireshark.org/review/21494 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: Michael Mann <mmann78@netscape.net>
2017-05-02Qt: Fix build without extcapStig Bjørlykke1-0/+2
Change-Id: Ibfcdb719408c0172ae78bf3b2761ff551ff6313c Reviewed-on: https://code.wireshark.org/review/21461 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-05-02Qt: Interface Toolbar improvementsStig Bjørlykke4-51/+150
- Select one of the capturing interfaces when start capture - Only send user changed control values when start capture - Don't show hidden interfaces - Allow a toolbar with no interfaces - Renamed button role "reset" to "restore" - Improved control number validation - Updated documentation Change-Id: Icc8d04043c95c1f3ef8d7cdc3b251be4471cba0a Reviewed-on: https://code.wireshark.org/review/21445 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>
2017-04-30[Automatic update for 2017-04-30]Gerald Combs7-3745/+3976
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I491517d8801f9b5d3d3084102ed35b418460e4b6 Reviewed-on: https://code.wireshark.org/review/21427 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macroStig Bjørlykke1-1/+1
Change-Id: Ief5f7bca5d110df8958307b58fc11bf740787dfd Reviewed-on: https://code.wireshark.org/review/21349 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macro, part 2Stig Bjørlykke1-2/+2
Change-Id: Id27a93c9a76b554bb2e98199d08d3d9604550889 Reviewed-on: https://code.wireshark.org/review/21348 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macroStig Bjørlykke5-12/+12
Change-Id: I75ff975216da23447b94bc513671ac269c52b7dc Reviewed-on: https://code.wireshark.org/review/21342 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>
2017-04-26Qt: Don't use _U_ for unused parameters in C++Stig Bjørlykke3-5/+4
Change-Id: If7acab5f438bb20b053fdcfef86b2f06765b5321 Reviewed-on: https://code.wireshark.org/review/21341 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-04-26Fix no-extcap build.Guy Harris1-0/+2
Change-Id: I9f01264bf5f0c28a4d871f6d983e9efed1c23259 Reviewed-on: https://code.wireshark.org/review/21347 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-25Qt: fix compilation without pcap.Dario Lombardo2-0/+5
Change-Id: Ia0fe79157f21fd0b1c0e5195c902ae07c55ca253 Reviewed-on: https://code.wireshark.org/review/21343 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-25Qt: Make text in SimpleDialog selectable by mouseStig Bjørlykke1-0/+1
This makes it easier to copy error messages. Change-Id: I39284d9b2d716336c6fc4b211e5346abcebf0aee Reviewed-on: https://code.wireshark.org/review/21326 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>
2017-04-25Qt: Add interface toolbar supportStig Bjørlykke14-7/+1699
An extcap utility can provide configuration for controls to use in a GUI interface toolbar. This controls are bidirectional and can be used to control the extcap utility while capturing. This is useful in scenarios where configuration can be done based on findings in the capture process, setting temporary values or give other inputs without restarting current capture. Todo: - Add support for Windows Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d Reviewed-on: https://code.wireshark.org/review/19982 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>
2017-04-24Move UI-only stuff out of libwireshark.Guy Harris3-3/+3
Packet ranges are used only in the UI; move the packet range stuff into libui. Don't pass a print_args_t structure to libwireshark packet-printing routines, just pass the few parameters they need. Move the declaration of print_args_t into file.h. Change-Id: Icff5991eea7d7d56f33b4716105895263d275bcf Reviewed-on: https://code.wireshark.org/review/21308 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>
2017-04-23[Automatic update for 2017-04-23]Gerald Combs7-245/+245
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: If8e6efa61c4c2808c51c585b0c61fd76a321c3fd Reviewed-on: https://code.wireshark.org/review/21298 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-20Have separate routines for open-for-reading and open-for-writing errors.Guy Harris1-1/+1
Expand comments while we're at it. Change-Id: I6dcc791eab1c9e323a9572f3d54720d223bdd64b Reviewed-on: https://code.wireshark.org/review/21252 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Qt: show relative time for the IO Graph in an appropriate unitPeter Wu2-18/+127
The GTK+ UI performs automatic formatting of the units (us, ms, s) based on the magnitude of the value (for MIN/MAX/SUM calculations). Internally the numbers are stored as integers (microseconds). The Qt UI did not have this formatting feature yet and would therefore display the values as-is (in microseconds). This patch rescales the Y value and appends an appropriate label (s, ms or us). With multiple graphs, rescaling is disabled completely for simplicity (GTK+ would still try to find an appropriate unit prefix if there are multiple time graphs). Bug: 12828 Change-Id: I26ed68fc3497e06ac283a618fee8b673b1b0cf71 Reviewed-on: https://code.wireshark.org/review/21062 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-20Qt: Prevent moving other columns on drag and dropPeter Wu1-1/+35
This workaround prevents moving around other columns during drag and drop and also transfers the sorting order to the new position. Bug: 13183 Ping-Bug: 13540 Change-Id: I4609c63557bf3abf06ba417ac1b40cac22a82abc Reviewed-on: https://code.wireshark.org/review/21022 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-20memory leak: Qt code doesn't pass 'parent' argument to some Qt class ↵Max Dmitrichenko2-2/+2
constructors found with valgrind Change-Id: I2d73bd50a6f0e13b1817c8a518189c0e56558f72 Reviewed-on: https://code.wireshark.org/review/21227 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-19remove unnecessary guint64 cast in IO graphXiaochuan Sun1-8/+8
Change-Id: I35d666a5a9fb5813706c312334f1552703c9475c Reviewed-on: https://code.wireshark.org/review/21214 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Have a common "capture file close alert box" routine.Guy Harris1-2/+2
Take cf_close_failure_alert_box() and put it into libui, with the name cfile_close_failure_alert_box(). Use it not only in file.c but also in ui/export_pdu_ui_utils.c, ui/gtk/file_import_dlg.c, and ui/qt/import_text_dialog.cpp where the error we get back isn't necessarily an errno. Have ui/gtk/file_import_dlg.c and ui/qt/import_text_dialog.cpp also use cfile_open_failure_alert_box() on open errors. Change-Id: I987f339a23ea58609390306a319923e7f92d5c07 Reviewed-on: https://code.wireshark.org/review/21203 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18CMake: Sort entriesStig Bjørlykke2-4/+4
Put additional_toolbar in sorted position. Change-Id: I483bca72265a5932f54ccf882c6659e94be5d95b Reviewed-on: https://code.wireshark.org/review/21183 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>
2017-04-18Qt: AdditionalToolbars is a menuStig Bjørlykke3-10/+10
Rename actionViewAdditionalToolbars to menuAdditionalToolbars because this is a menu, not an action. Change-Id: I85e45c065f415ffa008792f04127d81283e54b7e Reviewed-on: https://code.wireshark.org/review/21181 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>
2017-04-17Qt: Provide both file save and open preferencesAhmad Fatoum5-14/+42
This is a breaking change. prefs_register_filename_preference hasn't been differentiating between files to be saved and ones to be opened. On GTK, a neutral dialog is used, so no problems there. On Qt, a save dialog has been always used, even in dissectors that were reading configuration files without modification. prefs_register_filename_preference now takes an argument to indicate whether UI could be a save dialog with a warning on overwriting a file, or whether it's a general purpose open file dialog. Qt now does this. Previously no warning was shown on overwriting a file, so it may be used for opening files too without irritating the user. This has been changed, as non-destructive reads should now use the open dialog. Dissectors were changed accordingly. Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018 Reviewed-on: https://code.wireshark.org/review/21086 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-16[Automatic update for 2017-04-16]Gerald Combs7-176/+60
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I8165b1b2db0f81049a88dd17163a4367f04f83cc Reviewed-on: https://code.wireshark.org/review/21142 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-12Rename routines to clarify what they do.Guy Harris2-3/+3
XXX_prime_with_YYY makes it a bit clearer than does XXX_prime_YYY that we're not priming YYY, we're priming XXX *using* YYY. Change-Id: I1686b8b5469bc0f0bd6db8551fb6301776a1b133 Reviewed-on: https://code.wireshark.org/review/21031 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12Add an API to let a postdissector specify fields whose values it needs.Guy Harris1-0/+12
Currently, this is only used to determine whether a protocol tree needs to be built on the first pass or not - if there are postdissectors that need fields, it does - but eventually we should be able to use it to prime the dissection to deliver those fields in cases where we don't need the *entire* protocol tree (rather than using a hack such as cooking up a fake tap with a fake filter to do that). Update MATE and TRANSUM to use it. Clean up code to check whether we need a protocol tree, and add comments before that code indicating, in each case, what the criteria are. The array of postdissectors includes a length, so we don't need to separately keep track of the number of postdissectors. Clean up indentation while we're at it. Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7 Reviewed-on: https://code.wireshark.org/review/21029 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-11Qt: mark bool and enum prefs as changed when modified via the menuPeter Wu1-0/+2
When preferences are modified, these must be marked to ensure that the "prefs_changed" callback for Lua dissectors is invoked. Bug: 13536 Change-Id: Ib93b2920ebefbc1532d3c6cd097f802a45ec6f35 Reviewed-on: https://code.wireshark.org/review/21016 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-09Pull all the "load settings" calls into a epan_load_settings() routine.Guy Harris1-11/+2
That way, nothing using libwireshark needs to know what settings need to be loaded, they just call epan_load_settings(). Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af Reviewed-on: https://code.wireshark.org/review/20983 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the error reporting into {read,save}_filter_list.Guy Harris4-73/+5
Change-Id: I4d9582661f2f1728d400eeb2a1b1dea98f32ce7f Reviewed-on: https://code.wireshark.org/review/20982 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09[Automatic update for 2017-04-09]Gerald Combs7-883/+882
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I147cbfa4c9cca70ad581d2e3c149473afd243086 Reviewed-on: https://code.wireshark.org/review/20978 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-09Move the filter file reading code to libui.Guy Harris5-5/+5
It doesn't belong in libwireshark, as it doesn't affect dissection, but it *does* belong in libui, as it's helper code for the UIs. Change-Id: I8a5e0640a299a08e9ec1917dd253197438ebfdbc Reviewed-on: https://code.wireshark.org/review/20974 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the error-reporting code for preference files into read_prefs().Guy Harris1-32/+1
No need to duplicate it in N different programs. Update comments while we're at it. Change-Id: I3096cbe5448a19363eff6303bdd54e522dae9336 Reviewed-on: https://code.wireshark.org/review/20973 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Pull the code to save enabled/disabled lists into libwireshark.Guy Harris2-41/+2
It's identical in the GTK+ and Qt UIs, and it should just be done in libwireshark. Rename some routines to just speak of enabled_and_disabled_lists, so we don't have to say enabled_and_disabled_protos_and_heuristic_dissectors or something such as that. Clean up indentation. Change-Id: Ief2e612d9e1b60d8d0123b6bd3409dce5faf6495 Reviewed-on: https://code.wireshark.org/review/20970 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris5-53/+32
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-07Qt: Remember exact position of selected item in treePeter Wu1-3/+45
When switching between packets, the first field at a level would be selected. This is annoying if you have similarly structured trees (like TLVs or text labels). Combined with something like bug 13533, this causes erratic jumping. Fix this by incorporating the level position in the path. Change-Id: I998853ce899fffc69dd4932902508141325c35a4 Ping-Bug: 13533 Reviewed-on: https://code.wireshark.org/review/20799 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris22-41/+41
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X 10.0", for example. It was "Mac OS X" until 10.8 (although 10.7 was sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS X" from 10.8 to 10.11. Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3 Reviewed-on: https://code.wireshark.org/review/20933 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05Qt: support selecting the min/max packet from IO GraphPeter Wu1-1/+7
GTK+ supports selecting the first packet (via the "left mouse button") and the last packet (via the "right mouse button") in an interval, and Qt supports selecting the last packet of an interval. This patch enables picking the packet matching the extreme value in Qt. Bug: 12401 Change-Id: If0b7f2f1bf8c384ea0d68b5f5fae2d1e8b4b0ac2 Reviewed-on: https://code.wireshark.org/review/20769 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05Qt: fix tracer and selection of packet in IO GraphPeter Wu2-9/+32
Do not assume first graph in the list, pick the first visible graph. This (1) fixes the tracer which would otherwise show a marker at an non-obvious position that is not located on the graph and (2) fixes the GoToPacket action when clicking on the graph. Bug: 13537 Change-Id: I49d750102ad25c8539aa2e44fe1583cd535dd471 Reviewed-on: https://code.wireshark.org/review/20768 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-05Qt: Remove unused argument in Size stringStig Bjørlykke1-3/+3
Change-Id: I4c09092aba986c4fe224a46cac23d70bc5915aa6 Reviewed-on: https://code.wireshark.org/review/20923 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>
2017-04-04Qt: Fix Conversation dialog's refreshing tableMichal Labedzki1-1/+1
Fix wrong slot statement ("name"). Change-Id: I6911d6f7cb6d01ea14d5172c334c54f74ae6e546 Reviewed-on: https://code.wireshark.org/review/20897 Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-04Qt/Bluetooth: add results filter in HCI Summary windowPatryk Nowak3-0/+38
Add ability to display only these HCI commands whose names match specified filter. Currently only simple filtering is implemented (substring search, no regex-matching). Change-Id: I418d3d2d3e7a3b196d5ba05496d31c508e842dec Reviewed-on: https://code.wireshark.org/review/20880 Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org> Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-02[Automatic update for 2017-04-02]Gerald Combs7-593/+606
Update manuf, services enterprise-numbers, translations, and other items. Change-Id: I9e722e963dcf7437feb98a3176e6c507d86a9485 Reviewed-on: https://code.wireshark.org/review/20848 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-03-31Qt: do not expand collapsed trees when switching packetsPeter Wu1-2/+9
Scenario: user selects a field, collapsed tha parent tree and selects the next packet. Before this patch, the tree would be expanded again, selecting the child. After this patch, the tree will not be expanded, instead selecting the tree node that got collapsed. Change-Id: I7968fca1056a937cf3b399afb6f3089c2d199067 Reviewed-on: https://code.wireshark.org/review/20801 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-30Qt: Fix uninitialized memory access in val_units_Peter Wu1-3/+5
Fixes the following UBSAN errors: ui/qt/io_graph_dialog.cpp:1720:75: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t' #0 0x5611f0b0cd1d in IOGraph::setFilter(QString const&) ui/qt/io_graph_dialog.cpp:1720:75 #1 0x5611f0b737a1 in IOGraph::IOGraph(QCustomPlot*) ui/qt/io_graph_dialog.cpp:1682:5 #2 0x5611f0afb3f3 in IOGraphDialog::addGraph(bool, QString, QString, int, IOGraph::PlotStyles, io_graph_item_unit_t, QString, int) ui/qt/io_graph_dialog.cpp:340:24 #3 0x5611f0af7c19 in IOGraphDialog::IOGraphDialog(QWidget&, CaptureFile&) ui/qt/io_graph_dialog.cpp:289:13 ui/qt/io_graph_dialog.cpp:1818:19: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t' #0 0x5611f0b1167e in IOGraph::setPlotStyle(int) ui/qt/io_graph_dialog.cpp:1818:19 #1 0x5611f0b062ee in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:420:10 ui/qt/io_graph_dialog.cpp:1872:29: runtime error: load of value 3200171710, which is not a valid value for type 'io_graph_item_unit_t' #0 0x5611f0b13e6a in IOGraph::setValueUnits(int) ui/qt/io_graph_dialog.cpp:1872:29 #1 0x5611f0b06640 in IOGraphDialog::syncGraphSettings(QTreeWidgetItem*) ui/qt/io_graph_dialog.cpp:422:10 Note that calling setFilter with an empty string is pretty useless, especially since the filter is initialized later, so remove it. The choice for IOG_ITEM_UNIT_FIRST is quite arbitrary and needed because setValueUnits reads the "old" (uninitialized) value. Change-Id: I32c65a30593cb718b838c0f324e0d1b0eaab90e5 Reviewed-on: https://code.wireshark.org/review/20767 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-29Prevent crash/assert on access to "uninitialized" device.if_info.name.Joerg Mayer1-0/+1
While this is one possible way to fix it, it probably is not the "right" way to do it. I just don't know which one would be right. I regard several options to be cleaner: - Remove if_info from interface_t altogether and add the required fields to interface_t directly. - Never use device.if_info.name but always use device.name (same with friendly_name) - Initialize both fields the same (same with friendly_name) - Also not nice: device is optically a struct, not a pointer. So into the function, when we create a new struct (that's where the error "is made"), the same name continues to be used. Not improving my confidence into my solution: - I haven't bee able to figure out why the automated Windows builds don't crash/assert. Last but not least: The two qt/gtk functions should probably have their common core extracted into a common function. Change-Id: I1b36d1765d1a1ec975927cb5785a1540ba4952f5 Ping-Bug: 13448 Reviewed-on: https://code.wireshark.org/review/20721 Petri-Dish: Jörg Mayer <jmayer@loplof.de> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2017-03-29Throw in a cast to squelch a compiler warning.Guy Harris1-1/+1
MSVC warns that comparing a gboolean (which is a typedef for int) to a bool is unsafe; convert the gboolean to a bool (the post-C++11 draft C++ standard I have says that the conversion from integral to bool does pretty much what you'd expect - zero goes to false, non-zero goes to true - and is exactly what we want). Change-Id: Ia7d7b62baf87ca3a29da5140f68c2c5b38b2d6de Reviewed-on: https://code.wireshark.org/review/20787 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-29Qt: propagate selection from main screen to dialogPeter Wu6-3/+45
Ensure that the selection in main screen is updated on refreshing interfaces (InterfaceFrame::interfaceListChanged). Add additional patches to ensure that selection changes from the main screen propagate to the dialog and be careful to avoid infinite recursions. Life of a signal for InterfaceFrame: ui->interfaceTree->selectionModel emits selectionChanged -> slot InterfaceFrame::interfaceTreeSelectionChanged -> emits InterfaceFrame::itemSelectionChanged -> slot MainWelcome::interfaceSelected -> emits MainWelcome::interfacesChanged -> slot CaptureInterfacesDialog::interfaceSelected (updats dialog selection) Life of a signal for CaptureInterfacesDialog: ui->interfaceTree emits itemSelectionChanged -> slot CaptureInterfacesDialog::interfaceSelected (emission of next signal because sender is ui->interfaceTree) -> emits CaptureInterfacesDialog::interfacesChanged -> slot InterfaceFrame::updateSelectedInterfaces (updates main screen selection) This should probably be updated to model/view with shared selection model in the future. Change-Id: Ibb32c201a92bd2f1310523b3e6e63b03209c9ce4 Reviewed-on: https://code.wireshark.org/review/20487 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>