aboutsummaryrefslogtreecommitdiffstats
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2023-03-07Converting QByteArray to const char *Michal Ruprich1-1/+1
2023-03-07Qt: Fix copying from System Default profileJohn Thacker1-0/+1
Set the "profile_filename" property on the special System Default QAction in the CopyFromProfileButton so that the action will actually do something when triggered. Fix #13373
2023-03-06colors: Improve handling of errorsJohn Thacker1-22/+0
Pop up a dialog about bad coloring rules when reading the file (e.g., when first starting Wireshark), rather than waiting until you try to edit them. Have that dialog have details of the problem with the filter instead of a generic message. The report_warning code will consolidate multiple warnings into one if more than one filter has an error, rather than have lots of pop-ups. Since the dialog (or console message, in the unlikely event that somehow the colorfilters are read in a CLI tool) is called from the color filters code, get rid of the separate non-specific pop-up in ColoringRulesDialog and the special preference for having a bogus filter. Now, if the user has a bogus filter in the current profile's colorfilter, they'll get a useful pop-up warning at startup, when that filter is disabled. For filters imported / copied from other profiles through the coloring rules dialog, they'll get the same useful pop-up. For trying to enable a disabled coloring rules with an error, or inserting a *new* coloring rule with invalid filter expression (despite the editor's Red background warning about an invalid expression), there's already both the hint at the bottom of the screen and the OK button becomes disabled. (Maybe the hint could be larger or bold or something when there's an error.) Fix #14906. Fix #15034
2023-03-02Qt: Sequence diagram comments are not numbersJohn Thacker1-0/+3
The comments in the flow diagrams are conceptually an extra y Axis ticker label on the right. Tell QCustomPlot that we don't want to render things that look like sufficiently large numbers in scientific notation. Fix #18879
2023-03-02Qt: Don't double escape sequence diagram commentsJohn Thacker1-2/+1
In the flow diagram, the hint is an ElidedLabel, which now escapes HTML: d9adb6f712a63dca13957802664d37c52ea4181c So don't escape the comment before passing it to ElidedLabel, or the double-escaping will cause quotes, angle brackets, etc. to look like HTML entities.
2023-03-02help: WLANTraffic section moved WSUG chaptersJohn Thacker1-1/+1
The documentation for WLAN Traffic menu item in the Wireless menu was moved from the Statistics Chapter to the Wireless Chapter of the WSUG. Update the URL in its help button accordingly. Part of #17982
2023-03-02Qt: rtpstream_id memleakJohn Thacker1-0/+2
Free fwd_id and rev_id, not just their members, if they aren't used. Coverity CID 1512428
2023-03-01Qt: RtpStreamDialog leakJohn Thacker1-3/+6
In tapReset, the select rtpstread_id is copied member by member by QList append(), so don't allocate pointers on the heap that will be leaked. (Coverity 1477952)
2023-03-01Qt: RTP Analysis Dialog leaksJohn Thacker1-0/+3
Delete the tab name. Free the rtpstream_info_calc data after use.
2023-03-01Qt: More RTP LeaksJohn Thacker1-1/+1
Parent RtpAudioGraph with its QCustomPlot
2023-02-28RTP: Fix some memleaksJohn Thacker3-3/+29
In the tap, the stream ID allocated on the stack just needs a shallow copy of the addresses. It only needs a deep copy when being added as a new entry to the list. Restore the memleak fix from e76ca2d3cb005d9276c953a14e63523a21cdb8dc that was accidentally removed by 1b4b5e59e9afbf9a83e647755ed6b3a2f344464d
2023-02-27[Automatic update for 2023-02-26]Gerald Combs12-0/+48
Update manuf, services enterprise numbers, translations, and other items.
2023-02-27Qt: Fix some leaks in RTP Analysis windowsJohn Thacker2-2/+2
Parent the QActions that are created for Analyze and Play buttons for each RTP window, so that they are deleted when the button is deleted.
2023-02-26Qt: Remove unused memberJohn Thacker1-2/+0
This _GStringChunk is not initialized or used anywhere in PacketListModel (and has not been for quite some time, since 62ca0a609bf7a705c09730c5613abf1931c880f5)
2023-02-25Qt: Fix leak in Coloring Rules DialogJohn Thacker1-0/+1
We don't need the cloned color_filter_t after the ColoringRuleItem has been created (the char* strings are copied into QStrings), so free it.
2023-02-25Qt: Revert to our function for displaying bit speed with unitsJohn Thacker1-2/+2
The Qt formattedDataSize() locale aware function only handles sizes in bytes, not other units. Revert to using our format_size() function from wsutil for the bits per second display string in the Conversation window. Fix #18211
2023-02-23Qt: Show date for abs time for long captures in ConversationsJohn Thacker2-23/+49
Display the date with the absolute time if a conversation in the conversation table is over 24 hours long. Parse user entered filter strings for date times as both date times and dates. Fix #16092
2023-02-23Qt: Mapping between filter proxy column and displayed columnJohn Thacker1-28/+26
We need to convert between the column selected for filtering by the user (which is based on what is currently displayed in the tab) and the column in the model. The default mapToSource requires a QModelIndex and needs a row, and thus doesn't work when all rows are filtered out by the current filter (that is being replaced.) However, since our filterAcceptsColumn does not depend on the row, we can determine the mapping just based on the column number. We want to convert the filter column to the column used in the model when it is first selected, so that hiding columns later doesn't accidentally change what column is used for filtering. Improved fix #18738
2023-02-22Qt: Fix conversation dialog timeline graph columnsJohn Thacker6-60/+52
Remove the separate copy of the conversation column type enum in ConversationDialog. It doesn't correspond to the enum in ATapDataModel, because it doesn't include the Conversation ID and Total columns. Delegates set to the Traffic Tree (a QTreeView) apply to the displayed column number, not the what is displayed in the column. That is, when columns are hidden (filtered), the delegates stay with the old column number and end up being displayed on new content. That's not what we want; we want to always have the timeline graph on the Start and Duration columns. Moving around the Delegate depending on which columns are filtered is complicated; just set the TimeLine delegate to the entire TrafficTree, and use the default paint if we're on any column other than Start or Duration. This does mean that we don't need to store a map of Delegates. Use a slightly different way to get TimelineDelegate to paint the rect with no text using the current style, so we can use the default paint with text for other columns. The timeline graph needs to get the value of the Start and Duration columns as filtered by the proxy column, so have the model pass in indices so that they can be mapped to the current displayed column. Have the timeline graph apply to just the Start or just the Duration column if only one is visible. Together these compute the proper pixel values to apply the timeline graph to the Start and Duration columns regardless of which columns are displayed and which are filtered, in any tab, regardless of what optional columns appear in that tab. Fix #18860
2023-02-21UI: Fix typo in tooltip of Time Display FormatDr. Lars Völker1-1/+1
Fixes typo in tooltip for "Seconds Since First Captured Packet in "Time Display Format".
2023-02-20Fix build of PacketListModel with Qt5Nicolás Alvarez1-4/+2
a9a7dcec21 broke the build by using std::as_const (new in C++17, we require C++11). 189d93b4b8 switched to using a for loop with indices, but that still fails on Qt5, because Qt5 uses int instead of qsizetype. Switch back to the foreach-style loop, but using C++11 range-for instead of Qt's foreach (which is semi-deprecated). Also, use qAsConst, which works in C++11, instead of std::as_const.
2023-02-19Qt: Substitute for C++17 ismJohn Thacker1-2/+4
Replace C++17 ism from !9822 with code with the same effect that is valid earlier (cherry picked from commit 50f71efbe0955b32dfb99bb4933f6ff310b39283)
2023-02-19Qt: Plug leaks in Conversations/Endpoints windowsJohn Thacker2-3/+4
Set some models to have the Traffic Tab or Traffic Type List that creates them as parent, so that they will be deleted properly. Setting a model does not cause it to be deleted unless it is parented, because models can be shared among multiple views. Since these models are only used by the one view, parenting them is fine.
2023-02-17Qt: Ensure that add frame comments trigger recoloring, count updatesJohn Thacker4-96/+183
Add functions to PacketListRecord to invalidate a single record's colorization and column strings, used for a record is modified in a way that needs to trigger redrawing, but we don't need to redraw all packets. Move the functionality for adding, deleting, and setting frame comments into PacketListModel, operating on QModelIndexes (or on all physical rows in the case of deleting all comments from a file.) Trigger recolorization of any record with an updated comment. Only set a block as modified when deleting comments if we actually deleted comments. This avoids marking a file as modified if we delete all comments from all frames, or all comments from selected frames, when those comments do not actually have frames. If cf_set_modified_block is used to modify a block that is already modified, it can't update the comment count. In that case, return false and have the callers update the comment count. (It already has a return value, which is always true.) This avoids having the GUI warning about saving into a format that doesn't support comments when comments have been added and then removed. Note that, unlike with time references and time shifts, there are no fields (and hence no columns nor color filters) that depend on whether other fields have comments. If for some reason some were added, then the model data for all frames would have to be updated instead. Since there aren't, we don't need to redrawVisiblePackets, but we do need to drawCurrentPacket to ensure the packet details are redissected. Fix #12519
2023-02-15Qt: Fix scrollbar vanishing when adding columnsJohn Thacker1-8/+3
Don't call resize in applyRecentColumnWidths(). It doesn't seem to be necessary in Qt5 or Qt6 to stretch the packet list last column when the main window is wider than the total columns, and it doesn't seem to be necessary to get the horizontal scroll bar to appear if the columns are wider than the window frame either. (When adding and removing columns, resizing the main window, etc., the columns all behave as expected, including if the wide Info column is removed). Resizing the packet list makes the scrollbar (and minimap) disappear. It reappears when selecting another packet, but since it's not necessary to resize, don't. Fix #13597
2023-02-12[Automatic update for 2023-02-12]Gerald Combs12-1956/+2151
Update manuf, services enterprise numbers, translations, and other items.
2023-02-11UAT: Have a combobox for DissectorsJohn Thacker1-0/+20
Add a drop-down combobox for UATs, including User DLTs, that have a choice of dissectors. Make the combobox editable, which will provide suggestions, and pass things through to the existing UAT validation for dissectors. (It's a very long list, especially with 1717 entries, including 530 just from various BT GATT UUIDs, so being able to still type it in seems useful.) Dissectors are not protocols. Rename the UAT field from PROTO to DISSECTOR where used. Update the column names and long descriptions to use dissector instead of protocol in dissectors that used this. There may at some point be UATs that want protocols instead of dissectors, but that's not what the current behavior does and none of the current dissectors that use the existing types want. Update the documentation to use "dissector" instead of "protocol." Put the names of the actual current three Ethernet dissectors. Clarify that the "ip" dissector actually tries IPv4 and IPv6, instead of just IPv4. UAT entries are backwards and forwards compatible with versions without this change. Fix #18836.
2023-02-10Move ui/filter_files.[ch] to wsutilJoão Valverde7-664/+4
2023-02-10Move ui/clopts_common.[ch] to wsutilJoão Valverde7-167/+4
2023-02-10Move ui/cmdarg_err.[ch] to wsutilJoão Valverde32-141/+29
2023-02-10Qt: Fix click to packet on OverlayScrollBarJohn Thacker1-2/+7
Fix the calculation of the ratio for converting a packet number to the scrollbar value by accounting for the length of the slider. maximum() does not correpond to the last packet; it corresponds to the first packet shown when the scrollbar is at maximum. The last packet is maximum() + pageStep(). (See https://doc.qt.io/qt-6/qscrollbar.html#details) The quarter of a page padding should be subtracted, not added, from the calculated position. (Fix up 422c0f45d497872a963363132ec92d400a79538f) This correctly makes clicking on the a line in the minimap scroll the packet list so that the corresponding packet is 25% of the way down the visible window. (Excepting the cases of packets at the very beginning or end of the entire packet list.) Fix #13989
2023-02-09Preferences: Support configuring debounce timersMoshe Kaplan5-2/+33
2023-02-09Qt: Actually ensure that rows are colorizedJohn Thacker1-1/+1
PacketListRecords should only report themselves as colorized when colorized with the latest version of the coloring rules. Otherwise, ensureRowColorized will not recolorize rows when the rules have changed. This makes the minimap/intelligent scrollbar correctly update colors in the background when the rules have changed. (Rows that were being displayed were being updated, because the columnStrings were invalidated at the same time, and when fetching the columnStrings the colors would be updated if the rules had changed.) Fix #17621
2023-02-08Qt: Fencepost error in minimap/intelligent scrollbarJohn Thacker1-1/+1
The location of the next line should be based off one row larger than the current row. This fixes an issue where all the lines drawn in the intelligent scrollbar are off by one - the color intended to be drawn for the first packet never appears, the first packet corresponds to the line for the second packet, etc., and there is a line at the bottom that can never be colored in. Fix #18850
2023-02-07Move ui/version_info.[ch] to wsutilJoão Valverde16-758/+13
2023-02-07Move ui/exit_codes.h to include/João Valverde5-52/+26
2023-02-07Qt: Add ability to cancel sortingJohn Thacker3-20/+105
Add the ability to cancel sorting. Since we now parse user inputs during the sort, test and set the capture file read lock. Try to sort in PacketList::captureFileReadFinished, since now sorting during thawing won't happen if it's in the middle of a rescan. Fix #17640
2023-02-06Add a #define HAVE_MSYSTEM and use itJoão Valverde1-2/+2
In certain situations using __MINGW64__ is not correct. We want to have the condition apply using MinGW-w64 but also using MSYS2, which the __MINGW64__ condition alone does not capture. Add a HAVE_MSYSTEM C define and use it where appropriate.
2023-02-06Fix MSYS2 buildJoão Valverde1-0/+1
Fix: ``` FAILED: run/extcap/randpktdump.exe cmd.exe /C "cd . && D:\a\_temp\msys64\ucrt64\bin\gcc.exe -fvisibility=hidden -Wall -Wextra -Wpointer-arith -Wformat-security -fno-strict-overflow -fexcess-precision=fast -Wvla -Wattributes -Wpragmas -Wredundant-decls -Wunreachable-code -Wlogical-op -Wno-error=stringop-overflow= -Wno-error=deprecated-declarations -Wframe-larger-than=32768 -Wno-format-truncation -fdiagnostics-color=always -Wshadow -Wold-style-definition -Wstrict-prototypes -Wno-pointer-sign -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fmacro-prefix-map=D:/a/wireshark/wireshark/build/src/wireshark/= -fmacro-prefix-map=D:/a/wireshark/wireshark/build/src/build-UCRT64/= -O3 -DNDEBUG -pipe -Wl,--as-needed -municode CMakeFiles/cli_main.dir/cli_main.c.obj extcap/CMakeFiles/extcap-base.dir/extcap-base.c.obj extcap/CMakeFiles/randpktdump.dir/randpktdump.c.obj extcap/CMakeFiles/randpktdump.dir/__/resources/randpktdump.rc.obj -o run\extcap\randpktdump.exe -Wl,--out-implib,run\librandpktdump.dll.a -Wl,--major-image-version,0,--minor-image-version,0 run/librandpkt_core.a run/libwiretap.dll.a -lws2_32 run/libui.a run/libwsutil.dll.a D:/a/_temp/msys64/ucrt64/lib/libglib-2.0.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/a/_temp/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: run/libui.a(failure_message.c.obj):failure_messag:(.text+0x129): undefined reference to `__imp_wtap_strerror' ``` After this change: ``` [2177/2600] Linking C executable run/dumpcap Warning: Unused direct dependencies: /usr/lib/libnl-route-3.so.200 /home/jpv/code/wireshark/devel/build/run/libwiretap.so.0 ```
2023-02-06extcap: Fix of handling default valuesj.novak@netsystem.cz7-17/+38
2023-02-06Do not require using wsgcrypt.hJoão Valverde1-1/+1
The reason to use wsgcrypt.h was to wrap it around DIAG_OFF() macros and that should no longer be necessary.
2023-02-06Remove wspcap.h and use config.h insteadJoão Valverde2-2/+2
Forcing the use of a dedicated header to replace pcap.h is unnecessary code and mental overhead in this case. We can use config.h instead for the same purpose of defining a macro symbol before including pcap.h.
2023-02-06CMake: Cleanup unnecessary linking with shared librariesJoão Valverde2-6/+16
2023-02-05[Automatic update for 2023-02-05]Gerald Combs1-80/+80
Update manuf, services enterprise numbers, translations, and other items.
2023-02-04RTP Stream Dialog: Actually sort on packet lossJohn Thacker1-2/+7
The packet loss column has been sorting on a private variable that is never set(?!) and also is unsigned whereas the actual lost number is signed. Get the calculated packet loss number and sort by that. (Should this be sorting by the total number or the percentage, since the column displays both? Total number is first so let's use that.) This should probably be some kind of Model/View instead. Fix #16785.
2023-02-01Qt: Fix order of ShowAs enumsJohn Thacker1-1/+4
The ShowAs enum should stay in the same order as the Items are added to the ShowAs combobox, because setCurrentIndex() is used with the enum values, e.g. when setting the value to "Show As Image" when the bytes are an image. Fixup c9e08b7be317e0e7e0cf95baa64f52d33b392964
2023-01-31Qt: Fix Logray compilation with Qt 6.4Gerald Combs1-1/+1
Copy+paste afa2579124 to fix wireshark/ui/logray/logray_main_window_slots.cpp:1564:40: error: attempt to use a deleted function stats_tree_action->setData(cfg->abbr); ^ Qt/6.4.2/macos/lib/QtCore.framework/Headers/qvariant.h:199:5: note: 'QVariant<char *, false>' has been explicitly marked deleted here QVariant(T) = delete; ^
2023-01-29[Automatic update for 2023-01-29]Gerald Combs11-219/+234
Update manuf, services enterprise numbers, translations, and other items. services failed.
2023-01-29Qt: Allow caching columns while dissecting colorTomasz Moń1-2/+3
It is fine to dissect and cache columns data during color dissection if it won't evict already cached data. There is rather high probability of using the column data because color information is dissected in order.
2023-01-23[Automatic update for 2023-01-22]Gerald Combs12-653/+225
Update manuf, services enterprise numbers, translations, and other items.