aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/utils
AgeCommit message (Collapse)AuthorFilesLines
2019-08-20Qt: Fix null pointer dereferenceRoland Knall1-45/+17
Rework existing code to avoid unsafe localtime Change-Id: I266ae7e006c6aeed42af39fea07c888874d0f588 Reviewed-on: https://code.wireshark.org/review/34329 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-13Qt: Import zips with illegal namesRoland Knall2-19/+56
If a profile import contains illegal path names inside the zip container, the illegal names are being filtered out and replaced with an underscore Change-Id: I4e1bc495156b8c1cd3f4dfca69604e880647f74e Reviewed-on: https://code.wireshark.org/review/34220 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-29Qt: Fix memory leak in zip helperStig Bjørlykke1-0/+2
Memory allocated with malloc must be freed when done. Change-Id: I03fe15232cf589b4af3591018e842cf296e7ee2c Reviewed-on: https://code.wireshark.org/review/34120 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-27HTTPS In More Places, update some URLs.Guy Harris2-8/+10
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8 Reviewed-on: https://code.wireshark.org/review/34096 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26HTTPS (almost) everywhere.Guy Harris2-2/+2
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-25Qt: Export profilesRoland Knall2-5/+139
Allow for the export of profiles. The currently selected profile may be selected, as well as all user-defined profiles Fixes: Bug, where invalid data has been written into the profiles not present inside the original file Change-Id: I7c6310920a1f3a064cfcedc7774b742ff01c9b9e Reviewed-on: https://code.wireshark.org/review/34077 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17Qt: Import Profile informationRoland Knall2-0/+165
Allow easy import of profiles. Profiles must be stored inside a zip file, with no additional hierarchy. Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032 Reviewed-on: https://code.wireshark.org/review/33881 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-13Qt: Fix our template icon appearance on LoDPI screens.Gerald Combs1-1/+0
When creating a pixmap for a template icon, don't bother setting its device pixel ratio. Otherwise it will interfere with QIcon's size calculations. Change-Id: I8c89ce49c57d558ae48baf9c31227898c0f7f9ca Reviewed-on: https://code.wireshark.org/review/33919 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-06-30Qt: fix more more Qt 5.13 deprecation warningsPeter Wu1-4/+4
Potential functional changes: - rect_on_screen: the new function no longer subtracts the space needed for the dock, task bar, etc. - fontMetrics().width(text) -> fontMetrics.boundingRect(text).width(): the bounding box width could be larger than horizontalAdvance(text). For the bytes view, they should be the same due to monospace font. The display filter field calculation was made more accurate (it assumes that textMargins() is 0 which is the default). Change-Id: I70b7937f9215d3bef278befdac7c36a023ffff84 Reviewed-on: https://code.wireshark.org/review/33770 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-27Qt: Fixup our template icon generation.Gerald Combs1-33/+23
Use generatedIconPixmap() to generate our template icon variants. Change-Id: Ie952f0d02309420c6e8e347e031f37c5f43cdb9e Reviewed-on: https://code.wireshark.org/review/33758 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-26Qt: Make sure we create template icons for all modes.Gerald Combs1-5/+23
When creating a StockIcon based on a template, make sure we add pixmaps for each icon mode. Change-Id: Ia894229132e18a22a59797c8fb4590bc09508ba0 Reviewed-on: https://code.wireshark.org/review/33740 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-25Qt: Use a lighter link color in dark mode.Gerald Combs2-0/+33
Add ColorUtils::themeLinkBrush, which returns a readable link color in dark mode. Use it in place of existing ...palette().link() calls. Add ColorUtils::themeLinkStyle, which produces an HTML <style/> block that lightens the link foreground color in dark mode. Use this to style links in the about box and in elided labels. Catch ApplicationPaletteChange events where needed. Add dark theme / dark mode notes to the WSDG. Ping-Bug: 15511 Change-Id: I92925bd997f97b155491f55a8c818f03549bc7f4 Reviewed-on: https://code.wireshark.org/review/33704 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-23Qt: Handle ApplicationPaletteChange events in the welcome page.Gerald Combs1-1/+0
Update our various welcome page style sheets when we receive an ApplicationPaletteChange event. It looks like ApplicationPaletteChange is the proper way to detect a system-wide theme change, since we can infinitely recurse if we hold things wrong inside a regular PaletteChange event (I'm guessing setting CSS background and foreground colors were the culprits in this case). Switch from PaletteChange to ApplicationPaletteChange everywhere. Ping-Bug: 15511 Change-Id: I6e7aa627d9ca1d1d3872ab31620ea5c579061191 Reviewed-on: https://code.wireshark.org/review/33703 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-06-17Qt: Filter expression toolbar dark mode updates.Gerald Combs1-1/+1
Move plus-8.png to stock_icons/8x8 and rename it list-add.template.png which conforms to the Freedesktop icon naming specifications and makes it a template icon. Update our style sheet when we recive a QEvent::PaletteChange. Ping-Bug: 15511 Change-Id: I4b8ddcb4eb64f11faec21d5df4a3fd7fdc5cf488 Reviewed-on: https://code.wireshark.org/review/33626 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>
2019-06-16Qt: Allow Drag-and-drop on info and protocolRoland Knall2-11/+26
Allow for drag-and-drop on info and protocol columns. Protocol columns may also be dragged to the display filter, everything else is dragged as plain-text and can just be used as text Change-Id: I0fff390580c22175efe50037b18d7199949fd8eb Reviewed-on: https://code.wireshark.org/review/33621 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-16Qt: Fix drag-and-drop from packet listRoland Knall1-1/+3
Only initiate drag-and-drop when the left mousebutton has been clicked, and also add the filter as plain text, so to enable dragging to external applications. Change-Id: I2f6ac7f9c543d003070c2a6c0ce671ed5a215669 Reviewed-on: https://code.wireshark.org/review/33620 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-06-15Qt: fix typo in stock_icon.Dario Lombardo1-1/+1
Change-Id: I08fad08ba07bca0fc682f588ad91056a7191adb4 Reviewed-on: https://code.wireshark.org/review/33610 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-13Qt: Add support for template icons.Gerald Combs1-1/+34
Add support for ".template" icons, which are masked against the current WindowText color. Convert the edit-find icons to templates. Reload our icon(s) when we receive a QEvent::PaletteChange in MainWindow and in StockIconToolButton. Clean our SVGs. To do: - Convert other black or mostly black icons to templates. - Handle QEvent::PaletteChange in more places. Ping-Bug: 15511 Change-Id: I1ce78d92e769861dc38d86a3def5116fb869e2bf Reviewed-on: https://code.wireshark.org/review/33571 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>
2019-04-15Hava a routine to read the currently-selected frome.Guy Harris1-1/+1
Have cf_read_current_record() take a capture_file as an argument and read, into its wtap_rec and Buffer for the currently-selected frame, information for the currently-selected frame. Rename cf_read_record_r() to cf_read_record(). That gives us 1) a routine that reads the currently-selected frame into the wtap_rec and Buffer for the currently-selected frame and 2) a routine that reads an arbitrary frame into the wtap_rec and Buffer supplied to it. If you *want* the currently-selected record, use the former, otherwise use the latter. Change-Id: If6bd5915dd5bc18334d7b89859822a19234153a4 Reviewed-on: https://code.wireshark.org/review/32858 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-061514 is a better initial Buffer size than 1500.Guy Harris1-1/+1
Ethernet packets without the CRC are 1514 bytes long, not 1500 bytes long; using 1514 bytes will avoid a reallocation for a full-sized Ethernet packet. Change-Id: Ie8da3f13bf3df07e23e4478b7dcf84f06dec6a9d Reviewed-on: https://code.wireshark.org/review/32761 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-06Revert "Get rid of the per-capture_file wtap_rec and Buffer."Peter Wu1-1/+1
This reverts commit 9445403f9558901dc54c88754ff21795ea1803f3. cf_select_packet frees the buffer backing the dissection result (cf->edt) which results in use-after-frees when callers try to access the contents. See for example this call trace: * PacketList::selectionChanged * cf_select_packet(cap_file_, row) * frameSelected(row) -> ByteViewTab::selectedFrameChanged * addTab(source_name, get_data_source_tvb(source)) get_data_source_tvb returns the buffer that backs the dissection and must remain valid even after dissection has completed. If this is not done, then a possibly expensive redissection must be done in order to populate the byte view. The temporary memory savings are not worth it. Bug: 15683 Change-Id: Ia5ec2c7736cdebbac3c5bf46a4e2470c9236262d Reviewed-on: https://code.wireshark.org/review/32758 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-05Get rid of the per-capture_file wtap_rec and Buffer.Guy Harris1-1/+1
Most code that reads from a capture_file already has its own wtap_rec and Buffer; change the remaining ones to do so as well. Change-Id: I9b7c136642bbb375848c37ebe23c9cdeffe830c3 Reviewed-on: https://code.wireshark.org/review/32732 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-2/+2
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-22Qt: Fix our ColorUtils::themeIsDark comparison.Gerald Combs2-1/+7
Change-Id: Ice109cdd5451b67651f10da7e4001d6d4cb0c7f0 Reviewed-on: https://code.wireshark.org/review/32506 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>
2019-02-21Qt: Add display information to the About dialog.Gerald Combs2-0/+10
Add ColorUtils::themeIsDark and use it to report our dark / light mode in the "About" dialog. Summarize the HiDPI capability of our displays as well. Change-Id: I242af1eb48017d49b90e71099bb753e67a8dd32b Reviewed-on: https://code.wireshark.org/review/32115 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-08Qt: Fix copy ASCII characters from ByteViewStig Bjørlykke2-7/+8
Only copy ASCII characters when doing "Copy Bytes as Hex + ASCII Dump" from the ByteView. This is what we do in all other Hex Dumps. Also change the parameter name to reflect this. Change-Id: I63cc79ffa014fd9aa50c84d765ee168f0b1ea44a Reviewed-on: https://code.wireshark.org/review/31442 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-12-24Qt: Switch models and DataPrinter to new-style signals and slots.Gerald Combs1-6/+6
Change-Id: I56ecf0486c19dbd7a330628f2fe36d0a2c11b5da Reviewed-on: https://code.wireshark.org/review/31187 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-09-30Qt/FrameInformation: read packet record in private bufferPeter Wu2-12/+9
To prevent potential interference with other users of the capture file, read data in a private buffer instead of reusing the one from capFile. Change-Id: I6d689440e0cc13ef522e874fd8e5795a97a6aca7 Reviewed-on: https://code.wireshark.org/review/29922 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Qt/FrameInformation: do not use file-scoped memory for temporary dataPeter Wu1-9/+5
Let QByteArray own the memory instead of wmem to allow memory to be released earlier. Change-Id: Ibf6d1a56120d30daea76924b8006480854dcfbd3 Reviewed-on: https://code.wireshark.org/review/29923 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-09-07Qt: Add null check for finfo and hfinfoMartin Boye Petersen1-2/+2
Adding the null check fixes a bug that made wireshark crash when right clicking a subtree which doesn't have any preferences and if none of the parents had one either. The problem was introduced in commit 589413d8772f1450be9bd4a2550cb99a95f71299 Change-Id: Ia5bbae0a58298f3e9d912e44f33589da1cbfacc9 Reviewed-on: https://code.wireshark.org/review/29455 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-05-30Qt: fix memleaks on opening a context menuPeter Wu2-13/+7
FrameInformation was never deallocated, leaking the whole pinfo scope. Fix a dealloc-alloc-mismatch (packet_data_ was g_memdup'd). Attach the DataPrinter menu actions to the action group instead of the singleton DataPrinter instance, this enables freeing the actions when the submenu is gone rather than clearing this at program exit. Reported by ASAN. Change-Id: If13af94a60b07b0e52973ccc5c437ef987bfb394 Fixes: v2.5.0rc0-1627-g8a6ea0e454 ("Qt: Further cleanup ByteView") Reviewed-on: https://code.wireshark.org/review/27844 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17qt_ui_utils: fix issue found by PVS Studio (V519)Alexis La Goutte1-2/+2
The 'val_qstr' variable is assigned values twice successively Change-Id: I5cc80a3e68c08330ac3bbb7c8c45db105d7fb865 Reviewed-on: https://code.wireshark.org/review/27599 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01Fix comment end after SPDX identifierStig Bjørlykke12-12/+24
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: Copy as printableMichail Koreshkov1-1/+1
Copy all printable characters (like in GTK-based) but not only letters Change-Id: I5e431d0c52d65c5867f4893c86b6f0eb3f535972 Reviewed-on: https://code.wireshark.org/review/26757 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: Anders Broman <a.broman58@gmail.com>
2018-04-05Qt: remove ws_buffer_start_ptr calls from clang-scan.Dario Lombardo1-0/+3
They are false positives. Change-Id: I06b5c2d2f7f462143050ffd4a624f76a440d5d5a Reviewed-on: https://code.wireshark.org/review/26729 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05Qt: Remove checks for version below 5.2Roland Knall1-9/+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-09Generalize wtap_pkthdr into a structure for packet and non-packet records.Guy Harris1-2/+2
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 Lombardo19-19/+19
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 Lombardo12-168/+12
Change-Id: I111945c08f99818c249a868c12d9a7b3a3df64b3 Reviewed-on: https://code.wireshark.org/review/25563 Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-30Byte view: Mark bytes using an outline.Gerald Combs2-11/+0
Distinguish between hovered and marked bytes using a lighter and heavier outline. Remove the "mark" color definitions. Change-Id: Icf6363e920a634574b7a42a10ea77b538ce78290 Reviewed-on: https://code.wireshark.org/review/25513 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-25Qt 4.8 compatibility fixesPeter Wu2-13/+9
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-16Qt: add more sanity checks in utils (found by clang).Dario Lombardo1-1/+1
Ensure the pointer exist before dereference them. Change-Id: I7c2881c9c74b88517d01d9306507c14ff2a7b257 Reviewed-on: https://code.wireshark.org/review/25345 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-16Qt: Fix proto tree links and related frames.Gerald Combs2-2/+14
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: 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>
2018-01-05Qt: Move sized toolbar images to stock_icons.Gerald Combs1-2/+1
The sized (WWxHH) icons in the toolbar directory aren't limited to toolbars. Create a "stock_icons" directory and move them and their related SVGs there. Change-Id: I2c1852499594aa738371c79542f24bd3351653bb Reviewed-on: https://code.wireshark.org/review/25133 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-31Qt: Fixup fieldSelected behavior.Gerald Combs1-1/+1
Check the originating sender of fieldSelected in a couple of places so that we don't re-emit it. This fixes an issue that was keeping the byte view from marking the protocol. Remove duplicate signal+slot connections in MainWindow. Remove an unused member function. Change-Id: Ia876bb4117d1e30a56f4c335a65f6976c8058f9d Reviewed-on: https://code.wireshark.org/review/25077 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-28Qt: Fix moc interface issueRoland Knall2-11/+48
moc has an issue with interfaces defined in classes, where also other Qt objects are being defined. At least in some versions for Qt, this may lead to the interface declaration not being found Change-Id: Id143311322086abe23085d2482957ec330ae67c8 Reviewed-on: https://code.wireshark.org/review/25032 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-28Qt: Remove duplicate copy actionsRoland Knall1-0/+6
Remove the final copy actions from MainWindow and use DataPrinter instead. This way, MainWindow no longer is involved in copying data, and the actions purely are defined by DataPrinter Change-Id: Ib70ad6394dee501bb2c8d58c9d174a0eb04b47de Reviewed-on: https://code.wireshark.org/review/25031 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-27Qt: Add "Copy as…" to the byte view.Gerald Combs2-1/+86
Make ByteViewText an IDataPrintable and add "Copy as…" context menu actions. Remove some unused functions. Bug: 14276 Change-Id: Ie48c7c9b016de19fd8978397d03d23e9a7fe247a Reviewed-on: https://code.wireshark.org/review/24933 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-12-21Qt: Add back byte view hover.Gerald Combs2-7/+7
Add back the byte view hover behavior. Draw an overline+underline when hovering to make it a bit less distracting and to make hovered vs marked modes more obvious. Update names to match. Change-Id: I554d1cad98199f08f1c19796b14d158ad41706b4 Reviewed-on: https://code.wireshark.org/review/24932 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>