aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/export_dissection_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2021-03-08Remove modelines in ui/qt.Gerald Combs1-13/+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.
2020-04-27Qt: Fix export of dissectionRoland Knall1-1/+3
Exporting dissected bytes did not consider the selection of packets on Windows, if multiple packets had been selected Bug: 16516 Change-Id: I9d914fe1fed22f842d73caea397a3f37ffc0d523 Reviewed-on: https://code.wireshark.org/review/36958 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-10Win32: Fixup our file dialog titles.Gerald Combs1-2/+2
Add a "title" argument to each of the Win32 file dialog routines, and pass in one constructed using wsApp->windowTitleString. Change-Id: I5ff862bd28cd16093d99ae1559ecbaca907350da Reviewed-on: https://code.wireshark.org/review/35383 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>
2019-11-26Qt+macOS: Add /Volumes to the file dialog sidebar.Gerald Combs1-2/+2
/Volumes is hidden on macOS, which means that it doesn't show up in Qt's non-native file dialog. Add a constructor to WiresharkFileDialog that adds /Volumes to the file dialog sidebar. Make CaptureFileDialog and ExportDissectionDialog subclasses of WiresharkFileDialog. Bug: 13840 Change-Id: I4d7da3948b203eb11fb64fa056eb42a448edf914 Reviewed-on: https://code.wireshark.org/review/35201 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-11-17Qt: Multiselection in PacketListRoland Knall1-2/+2
This implements multi-selection for the PacketList. It allows multiple lines to be selected, and either drag/drop them to a text editor or use Ctrl/Cmd+C to copy the content to a clipboard. Opening the context menu disables the selection, and it does not change the underlying currently selection. This is done on purpose, as multi-selection is a copy-task only functionality at this point Export & Print work as expected, exporting just the selected items. Same goes for the copy menu, which has the additional entries for copying the list elements Bug: 14612 Change-Id: I77960aa1ab1d172a21abfa469baac0cd57f9f9d9 Reviewed-on: https://code.wireshark.org/review/35073 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-10-14Qt: Fix export dissection dialogTomasz Moń1-16/+15
The export got broken in f67eccedd9836e6ced1f57ae9889f57a5400a3d7 as it didn't account for ExportDissectionDialog::exec() override. Change-Id: Ieaed669cb1b12c7a069f685429bf5a82f89d7391 Reviewed-on: https://code.wireshark.org/review/34771 Petri-Dish: Tomasz Moń <desowin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Jim Young <jim.young.ws@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-05Add a "Include column headings" checkbox in export dissections and print.Guy Harris1-0/+2
Bug: 14945 Change-Id: I1c5ed0bc7e738a5c8d65c09f25686549e1e6dd67 Reviewed-on: https://code.wireshark.org/review/28615 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-27packet export: Add default file extensionGraham Bloice1-0/+14
Adds a default file extension when exporting packet dissection in various formats: text -> txt postscript -> ps csv -> csv pdml -> pdml psml -> psml c arrays -> c json -> json Change-Id: Ie5d942a3c694abd8edf9df184f6e219d4b870a1b Reviewed-on: https://code.wireshark.org/review/28490 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-25Qt: fix use-after-free on error while saving exported packetsPeter Wu1-0/+1
When an error occurs while saving packets using the Export Specified Packets dialog (e.g. try to overwrite the opened capture file), the dialog is displayed again. As PacketRangeGroupBox freed the packet selection range, a crash (use-after-free) occurs. Removes some unnecessary code in MainWindow::exportDissections as well. Change-Id: I63898427eff7e71799d89c8a22246db8f93a9ff6 Fixes: v2.5.0rc0-968-g38b40acb2d ("Qt: fix a memory leak when exporting packets") Reviewed-on: https://code.wireshark.org/review/27695 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-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>
2017-07-26Qt: Move utils to separate utils directoryRoland Knall1-1/+1
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-04-24Move UI-only stuff out of libwireshark.Guy Harris1-1/+1
Packet ranges are used only in the UI; move the packet range stuff into libui. Don't pass a print_args_t structure to libwireshark packet-printing routines, just pass the few parameters they need. Move the declaration of print_args_t into file.h. Change-Id: Icff5991eea7d7d56f33b4716105895263d275bcf Reviewed-on: https://code.wireshark.org/review/21308 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-16Rename packet-range.[ch] to packet_range.[ch]Michael Mann1-1/+1
The check*.pl scripts presume that files with the prefix "packet-" are dissector files and therefore have different rules than other files. Rather than trying to clarify that more with additional directory information, just make any non-dissector file with "packet-" filename prefix conform if it fails a "dissector specific" check from the scripts. Change-Id: I7cb52e1fad4ea62320492bb690904260f958aeb4 Reviewed-on: https://code.wireshark.org/review/19304 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-20Add JSON export to Qt/GTK UIPascal Quantin1-1/+6
Change-Id: I5ff46a40cdb1f8f41565d2aa54c6f9e61d397e3a Reviewed-on: https://code.wireshark.org/review/16013 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-26Choose the appropriate initial directory for the Export Dissections window.Jeff Morriss1-2/+26
Bug: 12105 Change-Id: Ib2398e5213b2ef2501660d1bba13dca66f04bd55 Reviewed-on: https://code.wireshark.org/review/14549 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-01Don't show a progress bar when previewing for the Qt print dialog.Guy Harris1-1/+1
We don't do much work to do that - we don't print anything before the first selected page, and once we're finished generating that page, we terminate the printing process - so it shouldn't need a progress bar. (If it needs a progress bar, We Have A Problem, as that slows down the drawing of the dialog box.) This should prevent the problem seen in bug 12040. Bug: 12040 Change-Id: I129191e06fff3e1eb59a9631c7395b9e7f650809 Reviewed-on: https://code.wireshark.org/review/14255 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23ui: Code cleanupStig Bjørlykke1-3/+4
Fixed code layout to use common style in the file. Mostly whitespace changes. Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2 Reviewed-on: https://code.wireshark.org/review/13504 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-08Qt: Fix use-after-free patternStig Bjørlykke1-3/+7
This fixes crashes due to use of deallocated memory in: - Export Packet Dissections - Merge Capture Files - Edit Packet Comment Change-Id: I3dab8c0735eb5e642d6a4580d20bc3c81cf1345b Reviewed-on: https://code.wireshark.org/review/10392 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-05-15Qt: Make sure we can fetch ExportDissectionDialog's layout.Gerald Combs1-0/+3
Make sure ExportDissectionDialog is a non-native, funny-looking file dialog so that we can fetch its layout. Fix and add some URLs while we're here. Bug: 11122 Change-Id: Icf62f7a436c7ba27ec20f84e7c1af1a5d7c9b949 Reviewed-on: https://code.wireshark.org/review/8479 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-31Qt: Convert more dialog titles.Gerald Combs1-2/+2
Change-Id: I9c3e3471a92b7af9347a541bece3d9405d37dce0 Reviewed-on: https://code.wireshark.org/review/6193 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-10-11Include ui/util.h.Gerald Combs1-0/+1
svn path=/trunk/; revision=52544
2013-08-29Add support for Qt5 (tested with 5.1.1).Gerald Combs1-1/+1
svn path=/trunk/; revision=51580
2013-07-12Move the print modules into epan.Jeff Morriss1-1/+1
svn path=/trunk/; revision=50526
2013-07-12packet-range.h moved to the epan directory.Guy Harris1-1/+1
svn path=/trunk/; revision=50518
2013-04-24The porting guide for Qt5 requires that Q_OS_ be used insteadJörg Mayer1-13/+13
of Q_WS_ in Qt4 projects See: http://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html svn path=/trunk/; revision=49013
2013-01-05Break out preference type names, type descriptions, stringGerald Combs1-1/+0
representations, and default status out of write_prefs and into their own routines. Split the corresponding custom preference write callbacks. Fix an apparent memory leak in the hidden column callback. Add an initial preferences dialog to the Qt port. Use the new preference routines to implement an "Adavanced" page similar to the "about:config" page available in many web browsers. Standard pages will hopefully follow soon. Remove some QDebug includes and make sure our QTreeWidgets have uniform row heights set. svn path=/trunk/; revision=46942
2012-11-01Add a print dialog to the Qt UI. Add support for null page element Gerald Combs1-1/+0
callbacks in print.c. Clean up some other issues in print.c. svn path=/trunk/; revision=45860
2012-10-31Set SVN properties.Gerald Combs1-1/+1
svn path=/trunk/; revision=45849
2012-10-24Make new text translatable for Qtshark * export_dissection_dialog.cpp * ↵Alexis La Goutte1-6/+6
file_set_dialog.ui * export_object_dialog.cpp * capture_file_dialog.cpp svn path=/trunk/; revision=45761
2012-10-24Add Modelines info for new Qtshark source file(s)Alexis La Goutte1-0/+13
svn path=/trunk/; revision=45760
2012-10-18Move ui-independent object export routines to the common ui directory.Gerald Combs1-3/+0
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export files. C++-ize epan/tap.h. Fix an apparent memory leak in eo_save_all_clicked_cb. The Qt dialog has an indeterminate progress bar. I tried adding something similar to the GTK+ dialog but event processing led down a rabbit hole. svn path=/trunk/; revision=45647
2012-10-16Add an include.Gerald Combs1-0/+2
svn path=/trunk/; revision=45596
2012-10-16Use topic_action instead of topic_cb for the Windows file dialogs. MoveGerald Combs1-8/+1
the common Qt help code to wireshark_application.cpp. svn path=/trunk/; revision=45594
2012-10-15Add help buttons. Ifdef out some code on Windows.Gerald Combs1-4/+17
svn path=/trunk/; revision=45564
2012-10-13Fix compilation with GCC:Evan Huus1-6/+5
- initialization order - unused and uninitialized local print_args_t - missing comment on #endif svn path=/trunk/; revision=45517
2012-10-13Fix Windows compilation problems from r45513. #ifdef out some non-WindowsGerald Combs1-18/+13
code. Get rid of a few uses of the global cfile. svn path=/trunk/; revision=45514
2012-10-12Add a packet format group box, similar to the packet range group box.Gerald Combs1-0/+249
Use it in the new "Export Packet Dissections" dialog. I'm omitting PostScript exports on purpose. If you *really* need that feature you can probably get better results than we produce using text + enscript or print-to-PDF + pdf2ps/pdftops or PSML/PDML + XSL + ... The Windows code is untested. I'll check in any needed fixes shortly. svn path=/trunk/; revision=45513