aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/uat_frame.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-06-09Qt: Fix crash when changing dfilter macroJohn Thacker1-2/+2
The comments claim that UAT_AFFECTS_FIELDS also triggers a redissection, but it does not. Fortunately, all UATs whose flags have UAT_AFFECTS_FIELDS also have UAT_AFFECTS_DISSECTION. dfilter macro expressions are a rare case of a UAT that should trigger FieldsChanged but not PacketDissectionChanged. (It's slightly unnecessary to invalidate the custom columns, but perhaps in the future macros will be possible in custom columns.) So resolve things by changing the comments to reflect current reality and making the dfilter macro UAT flags UAT_AFFECTS_FIELDS. This prevents a crash when removing a dfilter macro thus invalidating the current filter, and then opening a file (including reloading the current one.) Fix #13753
2023-04-12Qt: Don't change the UAT tree visibility when resizingJohn Thacker1-2/+0
It's not necessary to change the visibility of the UAT tree view when resizing the columns to the contents, and setting the visiblity to false has the side effect of making any editor that is still open not editable. This mostly affects the PathSelectionEdit used by directory and file names, which pass updates to the UAT after each character entered, instead of only after pressing Enter. (The UAT code does validation, but some widgets do their own validation too.) This prevents having to click in the editor after each character when entering directories or filenames.
2022-04-04Qt: Split MainApplication out from WiresharkApplication.Gerald Combs1-3/+3
Move WiresharkApplication.{cpp,h} to MainApplication.{cpp,h}. Add back WiresharkApplication as a thin superclass of MainApplication, similar to LogsharkApplication. Change all of our wsApp references to mainApp. We will likely have to change many or most of them back, but that's a commit for another time.
2021-09-08Qt: IOGraph - correctly add new graphsRoland Knall1-8/+11
If a graph is added it should be a single operation, not multiple setData operations leading to a myriad of dataChanged signals to be fired, which in turn can hinder redissection.
2021-03-08Remove modelines in ui/qt.Gerald Combs1-13/+0
Remove the editor modeline blocks from most of the source files in ui/qt by running perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' ) then cleaning up the remaining files by hand. This *shouldn't* affect anyone since - All of the source files in ui/qt use 4 space indentation, which matches the default in our top-level .editorconfig - The one notable editor that's likely to be used on these files and *doesn't* support EditorConfig (Qt Creator) defaults to 4 space indentation.
2020-12-04Qt: UAT editor column widths, italic pathnameChuck Craft1-4/+23
Closes #15968 #17059 - set width of pull down list so items are visible - allow user to resize columns in UAT editor - resize columns on open and changing data - if a UAT file does not exist, display the UAT name in lower right where pathname is displayed for files - pad pathname on right to account for right tilt of italic fonts Note: a future change may be to not resize columns where user has changed width.
2019-08-26Qt: Move CopyFrom from menu to buttonRoland Knall1-8/+4
Move the CopyFromProfile implementation from a menu to a button to ease integration in existing code Change-Id: I4fb4e952e89665eda99d162e891ac6d3516a6f02 Reviewed-on: https://code.wireshark.org/review/34266 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-21Qt: Convert the rest of the preference dialog list buttons.Gerald Combs1-0/+7
We no longer use the old icon names, so remove their aliases from stock_icons.qrc. Ping-Bug: 15511 Change-Id: If3c5e2b95825207a401e12607fcb94cdcc8a51c8 Reviewed-on: https://code.wireshark.org/review/33689 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-29Qt: move method to apply/undo UAT changes to UatModelPeter Wu1-21/+10
UatModel could be constructed with a name instead of an epan_uat type. To allow those users to save/revert the uat, make sure to expose a method that does not require access to the underlying epan_uat type. Change-Id: I1d1a5811c1025bd9c2a2ea1722f460e6ac33b9aa Reviewed-on: https://code.wireshark.org/review/31793 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-09Qt: Cleanup deletion of CopyFromProfileMenuStig Bjørlykke1-6/+4
Set the push button as parent to the profile list menu so it will be deleted when that parent is destroyed. Change-Id: Ide4a234e039a3e27d9ee4732a3800906c80be173 Reviewed-on: https://code.wireshark.org/review/31446 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-10Qt: Use regular size buttons on macOSStig Bjørlykke1-1/+2
Use regular size buttons in dialogs on macOS. Change-Id: Iad769190b7f62297343eea4299e3f03ea6be4b1e Reviewed-on: https://code.wireshark.org/review/30099 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-08Qt: Add copy from another profile for UAT framesStig Bjørlykke1-1/+31
Add a new button to UAT frames to copy entries from another profile. Change-Id: I9decb5ed5d67e97388ee7b22a15cacae4d5a3621 Reviewed-on: https://code.wireshark.org/review/30084 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-05Qt: Add copy from another profile in UAT dialogsStig Bjørlykke1-1/+1
Add a new button to UAT dialogs to copy entries from another profile. Change-Id: I641ba764d8738f738466529d74d4a21ff13075a0 Reviewed-on: https://code.wireshark.org/review/30028 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-13Start renaming SSL to TLS.Gerald Combs1-1/+1
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS" over "SSL" in user interface text and in the documentation. Fix the test_tls_master_secret test while we're here. Bug: 14922 Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8 Reviewed-on: https://code.wireshark.org/review/29649 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-01Fix comment end after SPDX identifierStig Bjørlykke1-1/+2
Move */ to a separate line below the SPDX identifier. Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f Reviewed-on: https://code.wireshark.org/review/27211 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05Qt: Remove checks for version below 5.2Roland Knall1-4/+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-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-02-02Qt: use SPDX identifiers.Dario Lombardo1-14/+1
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3 Reviewed-on: https://code.wireshark.org/review/25563 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-16Qt: Add UAT move up and down buttonsStig Bjørlykke1-0/+49
Add two new buttons for moving entries up and down in the list. Change-Id: I90e5c5812754391651885e2a622148cecc124099 Reviewed-on: https://code.wireshark.org/review/24413 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-15Qt: Update UAT clear button enablingStig Bjørlykke1-0/+1
Check for enabling the clear button when loading a UatFrame. Change-Id: Id9bbe4f99314d2798c4bccf10b57db99431a00fd Reviewed-on: https://code.wireshark.org/review/24412 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-10-21Add button in Qt UAT dialog/frame to remove all UAT entries at once.Michael Mann1-0/+17
Change-Id: If5a172cd69beeb0b9a22eb7f6b9e7cb25f350b49 Reviewed-on: https://code.wireshark.org/review/23968 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-31Qt: Fix errors when compiling for Qt4.Jens Kilian1-0/+1
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-07-26Qt: Move utils to separate utils directoryRoland Knall1-1/+1
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-22Have UatFrame send out proper notifications.Michael Mann1-4/+15
UatFrame was originally written for filter expressions, so it still had some "filter expression specific" functionality in it. Move the "filter expression notifications" to the preferences dialog and add support for proper notification if UAT affects fields or dissection (like expert info UAT). Change-Id: I84cd0c7923450692916bbc6c2cdce93a9830d722 Reviewed-on: https://code.wireshark.org/review/22758 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-07-16Qt: refactor UatTreeView into something reusablePeter Wu1-3/+5
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-11Qt: Move all utility widgets to widgets subdirectoryRoland Knall1-1/+1
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-09filter_expressions_preferences_frame -> uat_frameMichael Mann1-0/+279
There isn't anything "filter expression" specific about it and there are a few other things that could take advantage of a UatFrame. Change-Id: I0d04d176caebf0c2d8043c3bf89a81668580eae8 Reviewed-on: https://code.wireshark.org/review/22570 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>