aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models/supported_protocols_model.cpp
AgeCommit message (Collapse)AuthorFilesLines
2022-09-22Qt: if regex not valid don't attempt searchChuck Craft1-0/+2
Search is tried as user enter regex string. Regex will be invalid as they type it (starts with "\" or fat fingered "*") If Wireshark is run from command line, error line is generated for every attempted match in the search list. ** (wireshark:8344) 00:29:15.353028 [GUI WARNING] -- QString::contains: invalid QRegularExpression object
2022-05-12Qt: Fix clazy-incorrect-emit warnings.Gerald Combs1-2/+2
QAbstractItemModel::beginResetModel and endResetModel aren't signals, so don't emit them. dataChanged is, so do. Fixes clazy-incorrect-emit: https://github.com/KDE/clazy/blob/master/docs/checks/README-incorrect-emit.md
2021-11-26Qt: Use QRegularExpression instead of QRegExpTomasz Moń1-2/+2
Qt5 recommended to use QRegularExpression instead of QRegExp. Qt6 deprecated QRegExp and provides it in Qt5 compatibility module. QRegularExpression is generally faster and safer to use as the results are returned in separate QRegularExpressionMatch instead of modifying interal QRegExp object state.
2021-11-24Fix some of the compile errors when compiling with Qt6Joerg Mayer1-0/+1
This is basically applying c knowledge and Google to the compiler error messages. There is basically no understanding involved into what I was doing: - No idea why lots of #includes needed to be added for Qt6 - No idea how to actually fix the remaining problems, but it's a start Things that need to be done: - The AudioDeviceInfo thingy needs to be replaced by something new (as an interim solution another patch disables the audio player in Qt6). - GRegExp eventually needs to be replaced by QRegularExpression (available since Qt5.0, so development can be done in Qt5). - Solutions for the other problems like some methods no longer being available in Qt6 that have to sort of co-exist with Qt5.
2021-03-08Remove modelines in ui/qt.Gerald Combs1-14/+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.
2018-02-11ModelHelperTreeItem: Rename appendChild -> prependChildMichael Mann1-2/+2
The function was actually calling QList<QVariant>.prepend underneath and some users of the class may need "append" to mean "append". prepend() is faster, but current users are sorting all lists anyway. Change-Id: I65cb02f4a2d1960cc2c49034963b191156789cc9 Reviewed-on: https://code.wireshark.org/review/25730 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
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>
2017-12-27Add template helper for simple Qt tree modelsMichael Mann1-30/+1
Provide template class for data item of a tree model that has simple parent/child relationship and can handle the APIs necessary to navigate between parent/children. Also provide template class to shim between QAbstractItemModel and inherited class to handle "tree navigation" API. It's not supported by Qt 4.8, so hold off on actually using it. This saves a bunch of typing and enforces type safety. Change-Id: I431dee73625f5335b45fe9c6e4c2973932860ad8 Reviewed-on: https://code.wireshark.org/review/24988 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-19Fix some copy/paste errors with new models.Michael Mann1-1/+1
Change-Id: Ic018fafece38ef0e49321ef9ea5351848d5dd486 Reviewed-on: https://code.wireshark.org/review/24899 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-16Convert Supported Protocols dialog to use modelMichael Mann1-0/+301
Also have search file search name, filter and description columns Change-Id: Id519c5b1deb4a80e3b95437cf2e6d3e9510e4b11 Reviewed-on: https://code.wireshark.org/review/24857 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>