aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/widgets
AgeCommit message (Collapse)AuthorFilesLines
2017-09-20qt: Fix some leaked menu objectsMikael Kanstrup1-1/+1
Calling QPushButton.setMenu and QMenu.addMenu does not transfer ownership of the menu. Fix some leaks by letting "receiving" object act parent for the menu object. Bug: 14071 Change-Id: Id4edaf895503ef5dd4597eac99c2cdd6ad09b2ff Reviewed-on: https://code.wireshark.org/review/23600 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-09-19qt: Fix leaked style for OverlayScrollBarMikael Kanstrup2-3/+14
The QWidget::setStyle method does not transfer ownership of supplied style object. Fix leak by letting OverlayScrollBar free styles created. Bug: 14071 Change-Id: Ibc14cadfc6d012e8a909be21b4f8974009fa75f5 Reviewed-on: https://code.wireshark.org/review/23601 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-15Qt: Don't show text as invalid in disabled widgetsStig Bjørlykke1-1/+1
In Interface Toolbar the text widget should not be shown as invalid when the widget is disabled. Change-Id: I100a338216b34874064cb9f808a36703157811a4 Reviewed-on: https://code.wireshark.org/review/23549 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-09-07Qt: Construct QRegExp only onceStig Bjørlykke2-5/+4
In Interface Toolbar lineedit the QRegExp only needs to be constructed once, not for every validity check. Change-Id: I39e9ab9c57b4ac64a0b9b601fa72646d8c420274 Reviewed-on: https://code.wireshark.org/review/23425 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-08-31Qt: Fix errors when compiling for Qt4.Jens Kilian1-0/+6
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-31Fix MacOS buildJim Young1-1/+1
Commit 8d13f14f958b9ee00b59fd869bd1630f76e6fa65 introduced a preprocessor buglet affecting MacOS builds. Change #if to #ifdef. Change-Id: I3d76c83428658abcf382e18066be0e24309ecbba Reviewed-on: https://code.wireshark.org/review/23317 Petri-Dish: Jim Young <jim.young.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jim Young <jim.young.ws@gmail.com>
2017-08-30Qt: Temporarily disable DP scaling on non-macOS systems.Gerald Combs1-0/+4
Enable device pixel scaling in QCustomPlot only on macOS. Blind attempt at diagnosing / fixing bug 14012. Change-Id: I95e38eaa072d69aef0fe1d642951603800c3a280 Ping-Bug: 14012 Reviewed-on: https://code.wireshark.org/review/23314 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
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-08-09editor_file_dialog (qt/widgets): fix indent (use 4 spaces)Alexis La Goutte1-4/+4
Change-Id: I507737879c2e24cdca6d305b8e3775967071f1c3 Reviewed-on: https://code.wireshark.org/review/23028 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-07Use UAT model for I/O graphMichael Mann2-0/+116
Convert from using TreeWidgetItems to UAT model/delegate. More of the GUI is "just handled" within the table. Required to add support for "colors" and "protocol fields" to UAT types. Also needed to add some hacks for "custom" UAT field handlers for backwards compatibility with the existing UAT structure used. Because UAT functionality was switched completely to the model, some information in the table was "lost in translation" because the UATs themselves aren't translated to other languages. TODO: 2. Better "order of operations"? A bunch of NULL/size checks needed to be added to prevent crashing. Now with model/"view" should events/functions be reordered? Bug: 13585 Change-Id: I2bbba78182317c4fada07b927c05d0c6f4cdc0fe Reviewed-on: https://code.wireshark.org/review/22766 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-07Use proper tab order for "file types" in UAT "table".Michael Mann2-0/+114
Directory and File "UAT types" have been using a separately launched dialog, instead of an "editor", so it breaks "tab rules". Create and treat (File) dialog as an editor. Change-Id: I983728abefb0cdd79899468a800328f1b56e2910 Reviewed-on: https://code.wireshark.org/review/22886 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-30Define Q_NULLPTR as NULL if not already definedAlexis La Goutte1-0/+1
it is not supported with Qt 4.x Change-Id: Ie98d5e03d471869e08f5354a509c3317c7c780d7 Reviewed-on: https://code.wireshark.org/review/22831 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-26Qt: Move utils to separate utils directoryRoland Knall22-105/+27492
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-07-16Qt: refactor UatTreeView into something reusablePeter Wu2-0/+142
UatTreeView had two functions: 1. Saner navigation functionality when pressing tab. 2. Start editing when the currently selected item changes. Since this tab navigation functionality is desired in more places, extract this functionality. Add more documentation while at it and use an alternative, declarative style to connect signals. Move the second functionality to the caller since not all views need it. Change-Id: Ibe886f2c2763dbe024614203a44b72173fbbce06 Reviewed-on: https://code.wireshark.org/review/22639 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-14Remove some unneeded includes.Gerald Combs1-5/+0
Change-Id: I513936a74fe96211153fdf35f1832608b2cd053d Reviewed-on: https://code.wireshark.org/review/22617 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-07-11Qt: Move all utility widgets to widgets subdirectoryRoland Knall28-0/+4739
Move all utility widgets to the widgets subdirectory and add separate source_group for their files Correct some alphabetization in ui/qt/CMakeLists.txt noticed during compare. Change-Id: I2d664edc2b32f126438fb673ea53a5ae94cd43d1 Reviewed-on: https://code.wireshark.org/review/22531 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-06Qt: Add convenience function and cleanupRoland Knall2-0/+242
Add a convenience function for the displayfilter combobox and clean up some code. On Linux, the AltModifier does not work as it is being used by xDMs to move the window around. Setting it to Shift. Change-Id: I1ee9638c1cf37f40dc21f19c4e0860adc4629d4e Reviewed-on: https://code.wireshark.org/review/22529 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-28Qt: Drag/Drop Filter buttons to orderRoland Knall2-0/+286
Allow the ordering of the filter buttons via drag/drop in the toolbar Change-Id: Id8793d6514bae36066a7a23d6890985665e753bd Reviewed-on: https://code.wireshark.org/review/22422 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>