aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/wireshark_application.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-03-08Remove the periodic interface update in wireless toolbarMikael Kanstrup1-1/+7
The wireless toolbar retrieves the full list of network interfaces every 1.5 seconds to keep its list of interfaces updated. This not only adds unnecessary load on the system it also generates plenty of netlink traffic. When capturing packets on nlmon interfaces they are flooded with packets generated by Wireshark itself making it hard to understand the traffic that's really present on the system. Remove the periodic interface update and instead listen to network interface change events and update only when something has changed. The wireless toolbar need to know all when wireless interfaces are added/removed, not only whether an interface is 'up' or not so iface_monitor changes were also necessary. Bug: 15576 Change-Id: I8fb19fd919dfef1b6b35bf48790b105ecd2b60a8 Reviewed-on: https://code.wireshark.org/review/32350 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17Qt: Fix memory leak for CaptureEventRoland Knall1-4/+4
Make the argument to the events a non-memory object Change-Id: I46d8c24415aa2bc48b2a2d3b1fccffa6956d08b5 Reviewed-on: https://code.wireshark.org/review/26671 Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-16Qt: Rename packet_list_enable_colorStig Bjørlykke1-1/+0
Rename packet_list_enable_color() to packet_list_recolor_packets() to reflect what it does. Remove the call from where it's not needed. Change-Id: I55dd1a9af8f5b1dbd83b06136a5bbcfddea06cdb Reviewed-on: https://code.wireshark.org/review/26959 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05Qt: Remove checks for version below 5.2Roland Knall1-17/+0
This stops the main source from being buildable by Qt 4.x Change-Id: I61edbae04ac2b3bf0ae8ee8e09d335083945c176 Reviewed-on: https://code.wireshark.org/review/26756 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-23Qt: ensure that taps are invoked on reload/rescanPeter Wu1-1/+2
Invoke the tap draw callback immediately after reloading a capture (or changing a display filter) rather than waiting for a timer to expire. Change-Id: I3d1549d1a18c8e173cd29d45f31ce7586e0d70fe Reviewed-on: https://code.wireshark.org/review/26600 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-15Epan+Qt: Invalidate cached column strings.Gerald Combs1-5/+7
Add col_data_changed, which checks to see if we have updated column info. Add col_append_frame_number, which adds a frame number and sets col_data_changed. Call col_append_frame_number instead of col_append_fstr from some dissectors. Add PacketListRecord::invalidateAllRecords, which invalidates any cached record data. Add PacketListModel::invalidateAllColumnStrings which calls invalidateAllRecords and signals that our data has changed. Call invalidateAllColumnStrings when we have new name resolution or column information. Bug: 11414 Bug: 11468 Change-Id: I2671594a722f4f9436fe1df84d43489a148e0cee Reviewed-on: https://code.wireshark.org/review/26373 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-03-01Qt: Make we shut down cleanly when exiting early.Gerald Combs1-0/+3
Add an exit_application() routine that calls wsApp->quit() + exit() in the Qt UI and exit() in the GTK+ UI. Make sure we call it instead of exit() when needed. Bug: 14395 Change-Id: I171b5fd19ce4664db4a2ebb4b8c33e278dcec427 Reviewed-on: https://code.wireshark.org/review/26121 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-22Qt+Windows: Adjust our DBAR check logic.Gerald Combs1-1/+2
Don't bother fetching a file's version if its name doesn't match any of the DBAR DLL list entries. Otherwise we try to open a bunch of DLLs we don't care about. Change-Id: Icab11450839195c1259bb307ae88988f52917487 Reviewed-on: https://code.wireshark.org/review/25973 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-31Qt: Write recent before applying profile changesStig Bjørlykke1-0/+3
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-21Qt: Create byte views at the proper zoom level.Gerald Combs1-1/+9
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-08extcap: remove conditional compilation.Dario Lombardo1-4/+0
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-05Qt: Move sized toolbar images to stock_icons.Gerald Combs1-1/+1
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-04Qt: add conditional compilation in switches.Dario Lombardo1-0/+2
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>
2017-12-23Qt: Redesign signal/slot concept of capture_fileRoland Knall1-19/+42
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-17Qt: Handle RecentFileStatus destruction manually.Gerald Combs1-4/+0
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-17Qt: Update our recent status sooner at startup.Gerald Combs1-30/+11
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-16Qt: Show our recent files earlier.Gerald Combs1-5/+11
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-15Qt: Initialize QFontDatabase in a worker thread.Gerald Combs1-0/+13
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-14Qt: Add and use qUtf8Printable.Gerald Combs1-3/+3
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-11-20Qt: Move the MIME init thread to WiresharkApplication.Gerald Combs1-5/+27
The Qt 4.8 "Starting a Thread" document at http://doc.qt.io/qt-4.8/threads-starting.html says, "Note that you must create the QApplication (or QCoreApplication) object before you can create a QThread." It looks like this changed some time around Qt 5.5 or 5.6, e.g. https://codereview.qt-project.org/#/c/120793/, but just to be safe move the MIME database initialization thread to WiresharkApplication. We start reading the database later than I'd like, but it's still early enough to make a difference here. QMimeDatabase was added in Qt 5.0. Add version checks. Change-Id: Ic80ebb8692e93b1e4aea7a8670f4fcf45e385b29 Reviewed-on: https://code.wireshark.org/review/24512 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-17Qt: Initialize QMimeDatabase in a worker thread.Gerald Combs1-9/+32
As part of its initialization, QMimeDatabase parses the freedesktop.org shared-mime-info database, which is a large-ish (2 - 4 MB) XML file. This takes about 85 - 90 ms here. We first access QMimeDatabase in our startup sequence when we load the normal and capture application icons. Create a worker thread that initializes QMimeDatabase as early as possible and load load the normal and capture icons as late as possible. Change-Id: I27e3d65d8ee1308a62d12d3ff7e1b95f82c2e75a Reviewed-on: https://code.wireshark.org/review/24471 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-08Qt: Further cleanup ByteViewRoland Knall1-0/+14
This further separates ByteView and the rest of the system. Using FieldInformation and DataPrinter, this is the final cleanup of the ByteViewTab Change-Id: If41521167527cf5664c2564cdd0d45fea0f3f612 Reviewed-on: https://code.wireshark.org/review/22783 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-10-05Qt: Free dynamic menu actions at shutdownMikael Kanstrup1-0/+8
Some menu actions registered at startup are not freed at shutdown making Valgrind complain. Fix by clearing the lists holding them and making sure all actions have a parent to free them. Bug: 14071 Change-Id: I8d99d062d394a7262b0f9b7ddea4ed71049636ac Reviewed-on: https://code.wireshark.org/review/23793 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-31Qt: Fix errors when compiling for Qt4.Jens Kilian1-1/+2
This allows Wireshark to be built on RedHat EL 7.2, with Qt 4.8.5. Bug: 13909 Change-Id: Ia39a288cc342afa2bd0217cb59dac84c3227086c Reviewed-on: https://code.wireshark.org/review/23322 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-28Fix leaks when active capture interface goes downMikael Kanstrup1-1/+1
If an interface goes down while packet capture is ongoing related interface_option element is not freed properly. Fix by using the appropriate free function that both remove the element and frees element members. Ping-Bug: 13864 Change-Id: I66a11d64615dc9648441b532e4ff658ea42a5acf Reviewed-on: https://code.wireshark.org/review/23205 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-08-28iface_lists: Access ifaces member by referenceMikael Kanstrup1-3/+3
Change access of ifaces elements from by val to by reference. With this change unnecessary copying of the whole struct is avoided but even more important is that elements no longer have to be removed and inserted whenever data is updated. This change aims to make it more clear that ifaces elements shall never directly be removed from the array. Instead use function capture_opts_del_iface NOTE: Code for GTK UI not updated Ping-Bug: 13864 Change-Id: I04b65d5ee36526b30d959b8e5a2a48a3c7c4f15b Reviewed-on: https://code.wireshark.org/review/23204 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-28iface_lists: Access all_ifaces member by referenceMikael Kanstrup1-4/+4
Change access of all_ifaces elements from by val to by reference. With this change unnecessary copying of the whole struct is avoided but even more important is that elements no longer have to be removed and inserted whenever data is updated. This change aims to make it more clear that all_ifaces elements shall never be removed from the array without freeing resources via the capture_opts_free_interface_t function. NOTE: Code for GTK UI not updated Ping-Bug: 13864 Change-Id: I36742cb1d5c8daa136c9d3732a044a7c8e5c7fe7 Reviewed-on: https://code.wireshark.org/review/23201 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-27Qt: SimpleDialog fixes and updates.Gerald Combs1-0/+13
Add WiresharkApplication::mainWindow and use it to move the C simple_dialog routines to simple_dialog.cpp. In SimpleDialog, make sure our checkbox is initialized. Don't store our parent widget (which might go away) in a static variable, just use wsApp->mainWindow(). Make sure we use check boxes only in Qt 5.2 or later. Bug: 13275 Change-Id: I72a9715c59f2efd50f722197f416179e87bb6a8b Reviewed-on: https://code.wireshark.org/review/22805 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-26Qt: Move utils to separate utils directoryRoland Knall1-2/+2
Following the move for widgets directory, moving utils to the utils directory. Guidelines for this directory are: - Generic use but not a widget - Utility functionality used by many classes Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b Reviewed-on: https://code.wireshark.org/review/22602 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-01Qt+prefs: Add a dark theme check and default colors.Gerald Combs1-0/+4
Add prefs_set_gui_theme_is_dark and call it in the WiresharkApplication constructor. Add a set of dark syntax color defaults. We could alternatively add a preference for the syntax foreground color, but that would imply adding a preference for the background color as well. Bug: 11131 Bug: 13738 Change-Id: Iefe135ed04e63372ed434c5b9759647c9f4046e3 Reviewed-on: https://code.wireshark.org/review/21827 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-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 Harris1-16/+2
Change-Id: I4d9582661f2f1728d400eeb2a1b1dea98f32ce7f Reviewed-on: https://code.wireshark.org/review/20982 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Move the filter file reading code to libui.Guy Harris1-1/+1
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 Harris1-1/+1
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 Harris1-49/+13
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-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-7/+7
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-02-25Revert "Qt: call cleanup from destructor in WiresharkApplication."Peter Wu1-2/+1
Calling cleanup() twice (via exit signal and via destructor) results in a use-after-free on exit via write_profile_recent. This reverts commit e47f9fbeb090a68f9229b0f03c3f76a6285d2dff. Change-Id: Ic3ca0742c03a345fd8cb7f3f782942872a3057f5 Reviewed-on: https://code.wireshark.org/review/20273 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-22Qt: call cleanup from destructor in WiresharkApplication.Dario Lombardo1-1/+2
This allow the correct cleanup routine to be called both when user exits and when application exits by itself (like in WIRESHARK_QUIT_AFTER_CAPTURE=1). Change-Id: I88e468bde029b4247ac90616f3aba0065a2b8e00 Reviewed-on: https://code.wireshark.org/review/20210 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-22extcap: Reduce number of scans and storageRoland Knall1-0/+7
Reduce the number of storage arrays and the number of necessary loads. Also include cleaner methods for reloading the interfaces and cleanly reload if asked by the overall system Change-Id: I529465ec2593d40c955c6cdeaf3a85e3021c0596 Reviewed-on: https://code.wireshark.org/review/20230 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-16Qt: Warn the user about DBAR 1.8 on Windows.Gerald Combs1-0/+125
At startup, dig through the registry looking for shell extensions. If any of them match known Dell Backup and Recovery DLL names and the DLL version matches 1.8.*.*, show the user a warning dialog. This is a bit extreme but I'm not sure what else to do. Dell is a popular computer manufacturer and bug reports keep trickling in. Change-Id: I6d1bd6c56850279356570154d231b07facb30cff Bug: 12036 Ping-bug: 12701 Ping-bug: 13414 Reviewed-on: https://code.wireshark.org/review/16861 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-14Qt: Reset Default profile supportStig Bjørlykke1-2/+3
Add support for resetting the Default profile by deleting it in the Profile Dialog. All profile files will be deleted and all other files will be kept. Change-Id: I795a6db3ee7b2c29e7aba461183e6cc411798b75 Reviewed-on: https://code.wireshark.org/review/20097 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-02-10filter_list: add cleanup function and call it on exit.Dario Lombardo1-0/+5
Change-Id: I51d8074cc5a63d4fd3af8852df120d6b4163217f Reviewed-on: https://code.wireshark.org/review/19942 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-26Qt: Signal number of active capturesRoland Knall1-0/+12
Adds a signal, which emits the number of active captures Change-Id: I637106294e331e7fc7607f6fd7704492e22fa7ac Reviewed-on: https://code.wireshark.org/review/19799 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-12-24Add enabled protocol list for dissectors who are disabled by defaultMichael Mann1-0/+3
We save a list of dissectors that are disabled through the Enabled Protocols dialog. This is because we assume dissectors are enabled by default. For dissectors that are disabled by default, we have no way to keep them enabled through the Enabled Protocols dialog. A dissector that defaults to being disabled has to be reset to enabled each time Wireshark is launched. Add a list similar to the disabled list for enabling dissectors that are disabled by default. This mostly applies to post-dissectors. Change-Id: I31a8d97a9fdbc472fe2a8666384e0f8786bb8e9f Reviewed-on: https://code.wireshark.org/review/19405 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-20Qt+Win32: Make software updates more friendly.Gerald Combs1-0/+47
Add WinSparkle can_shutdown and shutdown_request callbacks which are called prior to running the installer. Reject updates when we have unsaved information. Add notes about possible improvements. Ping-Bug: 9687 Ping-Bug: 12989 Change-Id: Ia126244b311417aa3105ea8136f186adc2745445 Reviewed-on: https://code.wireshark.org/review/19244 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-11-10Qt: Handle retranslation events in the main window.Gerald Combs1-21/+24
Update most (but not all) of the main status bar text when the user changes the language setting. Try to distinguish between recent preferences and recent captures more clearly. Change-Id: I5278a503178fe3620a25b185742688f957dc30f4 Ping-Bug: 11307 Reviewed-on: https://code.wireshark.org/review/9575 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-20WelcomeUI: Make Open and Capture clickableRoland Knall1-0/+13
Make the texts "Open" and "Capture" clickable, and have them open the FileOpen and CaptureOptions dialogs respectively Change-Id: I2a3efbc4cdf160aa0b4efc6496d09228affbff46 Reviewed-on: https://code.wireshark.org/review/18303 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>