aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/models
AgeCommit message (Collapse)AuthorFilesLines
2018-10-21Qt: fix assertion failure when redissecting with a debug build of QtPeter Wu1-4/+4
Opening the Follow TCP Stream dialog triggers redissection and ended up triggering a "first <= rowCount(parent)" assertion failure. Fix the first and end arguments to reflect the actual number of displayed rows. Bug: 15014 Change-Id: Ic07834948a133bea752e45751ebe8be2da98a35e Reviewed-on: https://code.wireshark.org/review/30302 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-10-08Qt: Add clear all button to Decode AsStig Bjørlykke2-0/+11
Add a clear all button to easily remove all existing entries. Change-Id: I76e7ee2b7b85a9b4e5f9f5a788a89f38f70ee8ce Reviewed-on: https://code.wireshark.org/review/30052 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-05Qt: Add copy from another profile in UAT dialogsStig Bjørlykke2-0/+8
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-29Get rid of the printing preferences.Guy Harris1-5/+0
They're no longer used by any of the printing code; mark them as obsolete. Change-Id: Iceaf14f48f1bd35757a9a158a5348f6202b90fc7 Reviewed-on: https://code.wireshark.org/review/29911 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12More interface view cleanups.Guy Harris3-11/+20
Rename some of the columns - IFTREE_COL_NAME is the interface name, IFTREE_COL_DESCRIPTION is the description/friendly name, and a new IFTREE_COL_DISPLAY_NAME column is the display name (which may include both the description and the interface name). Rename IFTREE_COL_INTERFACE_COMMENT to just IFTREE_COL_COMMENT - there's no *other* type of comment, and "IF" is short for "interface". In the interface frame, use IFTREE_COL_DISPLAY_NAME, as that's the only column that shows both and thus has something for all interfaces. In the "Manage interfaces" dialog, put the description before the interface name, as it was in earlier versions. Change-Id: If0d959dcd4ca99913c941df00621da3c478233f6 Reviewed-on: https://code.wireshark.org/review/29090 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12Show just the description in the description column.Guy Harris1-1/+1
Don't show the display name, as that may include either the interface name, which is already in another column, or the column comment, which is also already in another column. Change-Id: I12f81d9e4579b82267062bb5e4e745925ed382b7 Reviewed-on: https://code.wireshark.org/review/29087 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-11Fix the "Manage interfaces" dialog columns.Guy Harris1-2/+2
Windows is not the only OS with "friendly" names for interfaces; macOS has them as well, and some *BSDs let you tag interfaces with names as well. The column headings for the "Interface Name" and the "Friendly Name" were backwards. Change-Id: I72543505cec9d479d8ab8aab3850daab3667805f Reviewed-on: https://code.wireshark.org/review/29082 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-27Qt: Comment some of the sparkline code.Gerald Combs1-0/+10
Explain some of the magic numbers and other parts of the sparkline code. Change-Id: Idfad30e773bd852ac021326467cf03ada91f6efc Reviewed-on: https://code.wireshark.org/review/28874 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-07-14Qt: try to sort numeric columns (such as ports) as numberPeter Wu1-21/+49
Ensure that columns with numbers are sorted according to their numeric value instead of their alphabetical order. Bug: 11460 Change-Id: I6ccfb9d3699c7e95de4ed31eb9424c5687661593 Reviewed-on: https://code.wireshark.org/review/28652 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-26Disable coloring rules with invalid packet-testing expressions.Guy Harris1-0/+1
If the packet-testing expression for a coloring rule is set to an invalid expression, disable the filter; this should provide at least *some* indication to the user that it's not valid, although we should really pop up a dialog or something - the little small-type notice below the list of filters is *really* not all that obvious. Ping-Bug: 14906 Change-Id: I3c036c3509520913db0a64c30bc1c57c0c7667bc Reviewed-on: https://code.wireshark.org/review/28444 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-18Get rid of some occurrences of Q_UNUSEDJoerg Mayer2-5/+2
- Trivial by just doing it the C++ way - Non-Trivial where the whole function can be put into the #ifdef instead of the variable use case Change-Id: I034751b8a3c70211173f0c06c954def94450db46 Reviewed-on: https://code.wireshark.org/review/28311 Petri-Dish: Jörg Mayer <jmayer@loplof.de> Tested-by: Petri Dish Buildbot Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-10If device->active_dlt = -1, show "Unknown" rather than "DLT -1".Guy Harris1-6/+14
It means we don't know the active link-layer header type - probably because the device can't be opened, so we can't get the default linktype or the list of available linktypes - so show it as "Unknown". Bug: 14847 Change-Id: I5a1ad360d2ae461e8db57e387679700a566b0949 Reviewed-on: https://code.wireshark.org/review/28185 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-07Preincrement iterators for better performanceJaap Keuter1-1/+1
Change-Id: I26853080bd0294a9058db99a30d1c06d6aac8e16 Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/28083 Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-28Qt: select a better default Decode As tablePeter Wu1-0/+25
USB has three possible tables, usb.device, usb.product and usb.protocol (shown in that order in the Decode As dialog). For single packets with no prior device descriptors, the last two tables have no valid selector (integer zero). In such cases it seems more reasonable to use tables for which a valid selector exists (for example, "usb.device"). Bug: 14717 Change-Id: I2319817fa11318a97519d8cfc912343b16224c12 Reviewed-on: https://code.wireshark.org/review/27820 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-16Windows: Make sure more native dialogs handle HiDPI.Gerald Combs1-2/+2
Add a WiresharkFileDialog class, which is a thin wrapper around a few QFileDialog functions that sets per-monitor v2 DPI awareness before showing native dialogs and resets the awareness context afterward. Use it where we call QFileDialog::getXXX. Change-Id: Ib711a70aa94b693a2515804a729f666ea7fbd673 Reviewed-on: https://code.wireshark.org/review/27568 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-05-01Fix comment end after SPDX identifierStig Bjørlykke34-34/+68
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-24remove redundant break statementchinarulezzz1-8/+0
Change-Id: Ib6d4bbb1662d921fc4b5920b50e47d2b30ebb95c Reviewed-on: https://code.wireshark.org/review/27103 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05Qt: Remove checks for version below 5.2Roland Knall10-82/+10
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-15Epan+Qt: Invalidate cached column strings.Gerald Combs4-1/+16
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-09spdx: use consistent formatting for GPL-2.0-or-laterPeter Wu4-4/+4
Change-Id: If8ffe67f6b624d7f1bcaa278a146e41247720226 Reviewed-on: https://code.wireshark.org/review/26393 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-07Qt: Handle UAT editor dialogs explicitly.Michael Mann2-57/+9
QAbstractItemView assumes that editors are widgets, not windows. QAbstractItemView::edit calls QAbstractItemViewPrivate::openEditor, which simply calls show() and setFocus() on the editor widget. If that widget happens to be a native dialog, its event loop might not be processed. This is the case on macOS at least. Create widgets derived from QLineEdit that edit the value directly along with a button that can open the associated modal dialog. Install event filters so that we keep the correct tab behavior between fields of the UAT. Bug: 13958 Ping-Bug: 14031 Bug: 7761 Change-Id: Ie5f0a5cbde33bb9add8217029c2063a0bbfd804a Reviewed-on: https://code.wireshark.org/review/23015 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-02-27Qt: accept hexadecimal input in Decode As dialogPeter Wu2-6/+6
The usb.product dissector table displays vendor+product values as hexadecimal, ensure that these are not parsed as zero. While at it, clarify the meaning of the model contents. Ideally the model should store numeric selectors as integers rather than strings, but that requires more work. Change-Id: I3bb17ad0d0a03c8813ded4ea6890dbc2aedd738d Reviewed-on: https://code.wireshark.org/review/26087 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-20Qt: Improve sorting of custom columns with multiple fieldsStig Bjørlykke1-11/+4
Use the already parsed col_custom_fields_ids to loop all fields in custom columns. Change-Id: I937e10e087feadc788591f2e3d49568611fda69b Reviewed-on: https://code.wireshark.org/review/25918 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-14Convert coloring rules dialog to use model.Michael Mann5-0/+848
Change-Id: I12a465b5451bdbaea871828329d48fda3627fca3 Reviewed-on: https://code.wireshark.org/review/25372 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-11ModelHelperTreeItem: Rename appendChild -> prependChildMichael Mann5-27/+27
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-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris1-5/+5
Separate the stuff that any record could have from the stuff that only particular record types have; put the latter into a union, and put all that into a wtap_rec structure. Add some record-type checks as necessary. Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2 Reviewed-on: https://code.wireshark.org/review/25696 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo61-61/+61
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 Lombardo34-476/+34
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3 Reviewed-on: https://code.wireshark.org/review/25563 Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-01Qt: Show Lua scripts as links in the about box.Gerald Combs2-4/+34
Add UrlLinkDelegate::setColCheck, which lets you render strings as URLs or plain text according to a regex. Use it to show Lua scripts as URLs in the about box. Open links on double clicks and add column checks. Change-Id: Iaf5cd8a46a0b66a7d45079ba045ed2bbcb0ed005 Reviewed-on: https://code.wireshark.org/review/25542 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-31Qt: About dialog updates.Gerald Combs4-20/+18
Open lua scripts when double-clicked. Behavior depends on your system configuration. Add tooltips accordingly. Let Qt wrap the "Wireshark" tab information. Set column widths by eyeballing their contents. Elide the Folders and Plugins strings in the middle. Fixup placeholder text capitalization. Draw links using the palette link color. Change-Id: Ic141eae05541480ec1e254c55fd81728d04713d9 Reviewed-on: https://code.wireshark.org/review/25510 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-30Qt: Fix crash when no plugins are configuredJaap Keuter1-1/+2
Configuring Wireshark with Cmake using -DENABLE_LUA:BOOL=OFF and -DENABLE_PLUGINS:BOOL=OFF causes all plugin support to be removed. The about Wireshark dialog wasn't made aware of that trying to manipulate the related mdoel anyway, causing a crash. Make the compilation of the offending code conditional. Change-Id: Ifa51f40fda7f019d09327dc5650e5a55da2daf2a Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/25517 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-26Qt: Simplify files column in about dialogPeter Wu2-114/+0
HTMLTextDelegate fails to build in Qt 4.8, partially because QStyleOptionViewItem.text is introduced with Qt 5. Another issue with the current implementation is that the "Copy" action includes the HTML tags for italics. To fix these, just remove the italics formatting. Change-Id: I63aed7c3d0da3d9829d410d75fc18daa4049c0ca Fixes: v2.5.0rc0-1822-g73c01d6d05 ("Qt: Rewrite the About dialog to use models") Reviewed-on: https://code.wireshark.org/review/25470 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-25Qt 4.8 compatibility fixesPeter Wu4-0/+7
Add missing include headers, define Q_NULLPTR for all Qt objects (to avoid having to include an ugly compat header), use old signal/slot syntax (Q_SIGNALS are protected in Qt 4.8), disable Qt 5 log message handler, etc. Change-Id: I449beb0b74050fdfb0fc5828d8fb74eedb2b45bf Reviewed-on: https://code.wireshark.org/review/25469 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-21Qt: Implement ProtoTreeModel::flags.Gerald Combs2-0/+10
QTreeView checks to see if Qt::ItemNeverHasChildren is set in various places, particularly when updating its set of expanded items. Implement ProtoTreeModel::flags and set Qt::ItemNeverHasChildren when needed so that QTreeView won't mark a leaf node expanded. Otherwise ProtoTree::isExpanded will return true when it shouldn't and break the iterator in ProtoTree::toString. Bug: 14355 Change-Id: Id89be9911aa14dbbb52725f7203ac26a747c42fc Reviewed-on: https://code.wireshark.org/review/25376 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-19Qt: add sanity check in InterfaceTreeCacheModel (found by clang).Dario Lombardo1-3/+1
Change-Id: I8f73254d8ac4b560937431b592a81ad726ce43a9 Reviewed-on: https://code.wireshark.org/review/25370 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-19Qt: remove leak from PathChooserDelegate (found by clang).Dario Lombardo1-2/+3
Change-Id: I71d73c8464450f8cbc655f8f99f54bd34eddd344 Reviewed-on: https://code.wireshark.org/review/25374 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-01-18Qt: I/O graph fixes.Gerald Combs2-9/+6
Use Qt::DecorationRole when setting and getting a color and Qt::CheckStateRole when setting and getting the check state of UatModel items. Add a default role for UatModel::data. Convert between value strings and their respective values where needed. Bug: 14317 Change-Id: Idd3eb773dc9944f982f6dbd7d49f73f4a60dd5a2 Reviewed-on: https://code.wireshark.org/review/25355 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Jim Young <jim.young.ws@gmail.com>
2018-01-16Qt: Fix proto tree links and related frames.Gerald Combs1-0/+15
Add FieldInformation::isLink and use it to style link items. Add back a related frame information. Get rid of rowsInserted() and just visit each tree node starting from the root. Change-Id: I0e7ef6b2e11d25465705adffbb77d6f6cfb2a435 Reviewed-on: https://code.wireshark.org/review/25342 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-15Qt: add assert to avoid null dereference (CID: 1427426).Dario Lombardo1-0/+2
Change-Id: Ib3a5830a4ae07ebb9bd2657599d668af03c896c8 Reviewed-on: https://code.wireshark.org/review/25275 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-15Qt: change obsolete qVariantFromValue into QVariant::fromValue.Dario Lombardo3-5/+5
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>
2018-01-14InterfaceFrame: don't use pointers for modelsMichael Mann2-3/+35
Change-Id: I6d41ba89006abb8f8e703f6d703370169062f7e9 Reviewed-on: https://code.wireshark.org/review/25285 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-14Qt: Reword text shown when no interfaces displayedStig Bjørlykke1-1/+1
Change-Id: Ic5ba4e562fe031b95fd2a7ab2d86de9bc09d5311 Reviewed-on: https://code.wireshark.org/review/25300 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-12Qt: Add some translation hints.Gerald Combs2-11/+11
Add translation hints for the PrefsModel names. Change-Id: I003bea668cdb3340182227722cef42f7007bba1e Reviewed-on: https://code.wireshark.org/review/25287 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>
2018-01-12Qt: add info for extcap disabled in main window.Roland Knall2-0/+6
Add an item to the end of the interface list, if the extcap interfaces have been disabled. Change-Id: I2643efb5dda9045e9e00fa3f815014f26a78085f Reviewed-on: https://code.wireshark.org/review/25218 Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-12Qt: Add InfoProxyModelRoland Knall2-0/+165
Add an identity model, which can be used to display non-selectable information at the end of any list Change-Id: Iaca436f34cb8e5b251eb0dc00ea2c0ce1bd9e0e2 Reviewed-on: https://code.wireshark.org/review/25280 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-08Bugfix the sort order of protocols in Preference dialog.Michael Mann2-20/+28
Sort properly by module title. Also consolidate some of the searching in PrefModuleTreeView. Change-Id: I5312581c63f8626de08bd9f03613219b34bf968a Reviewed-on: https://code.wireshark.org/review/25176 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08extcap: remove conditional compilation.Dario Lombardo3-17/+2
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-06Add ability for preferences to determine what they can change.Michael Mann1-3/+3
Add flags field to preference structure to help determine what areas of Wireshark are affected by a preference changing. The intent is to be able to distinguish dissection from GUI or other changes that are not dissection. The default is to have all preferences affect dissection, but their flags can be changed. This patch doesn't change any flags from the default. Change-Id: Ied5ae961bc3f33f5b730b2892fff3fa0898380b8 Reviewed-on: https://code.wireshark.org/review/25171 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05Qt: Add manager for preference dialogMichael Mann2-213/+32
Abstract out the different types of preferences into a visitor and factory pattern to handle the preference dialog. Change-Id: Ia611ec192dcc1ad638a997182cec1ab5bdb7859c Reviewed-on: https://code.wireshark.org/review/25142 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-01-04Convert preference dialog to use more models.Michael Mann4-0/+1265
Convert Advanced view and Modules view to use a single base model, loading the preferences once and then filter and display what they need with QSortFilterProxyModel derived classes. Convert the PreferencePane "types" to just strings. This allows a more straightforward relationship between the "special" modules that need custom widgets for preference manipulation and it also removes dependency on preferences_dialog.h for many files. Change-Id: I091deb3061564aa4d1564e9ca1c792715961b083 Reviewed-on: https://code.wireshark.org/review/25134 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>