aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/display_filter_expression_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
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-02-20Don't cast away constness.Guy Harris1-1/+1
Change-Id: I04cb49a5fe52bc6de66575228b81db1288bd1959 Reviewed-on: https://code.wireshark.org/review/25948 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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>
2018-01-15Qt: change obsolete qVariantFromValue into QVariant::fromValue.Dario Lombardo1-1/+1
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>
2017-10-05qt: Fix leaked dialogsMikael Kanstrup1-0/+1
Some dialogs are allocated on heap but not freed when the dialog boxes are closed. This means one dialog instance is leaked each time opened/closed. Also dialogs being subclasses of GeometryStateDialog means they might lack a parent reference and are not automatically freed on application shutdown either. Fix these leaks by letting the dialogs automatically destroy themselves on close (via WA_DeleteOnClose). Capture filter, display filter and capture interfaces dialogs are also leaked on application shutdown. These dialogs are protected by a NULL check that at least prevent multiple instances. Though none of them are freed on application shutdown. Fix leaks by freeing when main window is destroyed. Bug: 14071 Change-Id: I8c5c5a75ad3c89abb5996941875ba5d616a22d9c Reviewed-on: https://code.wireshark.org/review/23747 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 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-01-26Add 'in' operator in display filter expression dialogJaap Keuter1-8/+26
Add the 'in' operator to the list of available operators, where 'eq' operator would be present also. Setup the curly bracket expression in the filter and allow for multiple enums to be selected. Ping-Bug: 12808 Change-Id: Ibeef52ba9d41549d0684b0069270ff09f5a93e81 Reviewed-on: https://code.wireshark.org/review/19767 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-12Qt: Remove unneccessary Q_DECLARE_METATYPERoland Knall1-4/+4
Remove unnecessary Q_DECLARE_METATYPE macros and replace calls to QVariant conversions with VariantPointer where necessary Change-Id: Ia4690590095f930bf94644197de7fa30b00ee7ec Reviewed-on: https://code.wireshark.org/review/19611 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-05-19Add missing #include <algorithm> for std::sort()Michal Labedzki1-0/+2
Definition of std:sort() is in <algorithm> header. Include it to make Wireshark buildable again. Change-Id: Ice68013b0e06461faab1f4f0296e26b426ff92a1 Reviewed-on: https://code.wireshark.org/review/15456 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-04-25Qt: Speed up the Display Filter Expression dialog appearance.Gerald Combs1-34/+58
Copy over and adapt SupportedProtocolsDialog::fillTree, which fills in the protocol tree after the dialog is shown processes display events while the tree is being built. Change-Id: I25082fd94c511db6a94aaed1c463ba1c1e64855c Reviewed-on: https://code.wireshark.org/review/15079 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-04-14Qt: Make sure we call proto_initialize_all_prefixes.Gerald Combs1-0/+2
Call proto_initialize_all_prefixes when we open the Display Filter Expression Dialog. This matches the GTK+ UI behavior. Change-Id: Ie8f8a618d29667fce1f61b6e854baed85c54a569 Reviewed-on: https://code.wireshark.org/review/14920 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-4/+3
Add GeometryStateDialog class to handle load and save dialog geometry. The QDialog class name will be used as window name. For shared classes the UAT name or the statistics title or abbr will be used. Change-Id: I5a019598307fb3861518f41e733de834788184d8 Reviewed-on: https://code.wireshark.org/review/14139 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-02Display Filter Expression dialog updates.Gerald Combs1-5/+6
De Morganize an expression. Clear the selection at start. Selecting the first item (104apci) seems to confuse people. Change-Id: I8fcd1f068f1801042a2658940175b46bdfb2b462 Reviewed-on: https://code.wireshark.org/review/13647 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-18Qt: Fixup the Display Filter Expression syntax logic.Gerald Combs1-1/+1
In the Display Filter Expression dialog, only disable the OK button when we have an invalid filter. Move the deprecated warning string from DisplayFilterEdit::checkFilter to SyntaxLineEdit::checkDisplayFilter so that we can use it in more places. Change-Id: I938f5f10258f4fd9dd3a33c174dd9958c9634766 Reviewed-on: https://code.wireshark.org/review/13317 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-05Move utf8_entities.h to wsutilJoão Valverde1-1/+1
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0 Reviewed-on: https://code.wireshark.org/review/10786 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>
2015-08-06Use int_to_qstring in a few more places.Gerald Combs1-2/+2
Change-Id: Id324fe21f436a233088d106553db2ed6f6e410ac Reviewed-on: https://code.wireshark.org/review/9899 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06Add proper base prefixes in display filter expressions.Gerald Combs1-2/+5
When the user selects an enum in the display filter expression dialog make sure we add the proper base prefix Add a Qt UI convenience routine for formatting integers. Because deprecating QString::sprintf was a well-thought-out decision that will be regarded highly for decades to come. Fix search visibility while we're here. Bug: 11421 Change-Id: I1368bc8f464983793bdc90760cf3b7c18b6bd859 Reviewed-on: https://code.wireshark.org/review/9885 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-25Qt: use <> for including the generated ui_*.h filesMartin Kaiser1-1/+1
this should make Visual Studio pick up the generated include files from the build directory instead of the source directory (which may contain lefovers from an in-tree build) Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b Reviewed-on: https://code.wireshark.org/review/9129 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-05Qt: Add the capture and display filter dialog.Gerald Combs1-0/+1
Use a single overloaded dialog, similar to the GTK+ UI. Change-Id: If85db14a7101770f115bef725f5145e0010c518d Reviewed-on: https://code.wireshark.org/review/8776 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-03Add the Display Filter Expression dialog.Gerald Combs1-0/+427
Changes from the GTK+ UI: - The display filter is built on the fly with immediate syntax feedback. - Slightly different layout. - You can search for fields. Make the plain SyntaxLineEdit a bit more plain. Bug: 11128 Change-Id: I06a48cd7b9ba7b9dc193b0199540aede4eb62fa7 Reviewed-on: https://code.wireshark.org/review/8742 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>