From b3f240dbf8c5e24cf420e977d8544c4abb40c80e Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Tue, 12 Nov 2019 16:39:19 +0100 Subject: Qt: Multiselection in PacketList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- ui/qt/export_dissection_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/qt/export_dissection_dialog.cpp') diff --git a/ui/qt/export_dissection_dialog.cpp b/ui/qt/export_dissection_dialog.cpp index e0afdfbe94..507d4c75e5 100644 --- a/ui/qt/export_dissection_dialog.cpp +++ b/ui/qt/export_dissection_dialog.cpp @@ -46,7 +46,7 @@ static const QStringList export_extensions = QStringList() #endif -ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *cap_file, export_type_e export_type): +ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *cap_file, export_type_e export_type, QString selRange): QFileDialog(parent), export_type_(export_type), cap_file_(cap_file) @@ -119,7 +119,7 @@ ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *ca /* Default to displayed packets */ print_args_.range.process_filtered = TRUE; - packet_range_group_box_.initRange(&print_args_.range); + packet_range_group_box_.initRange(&print_args_.range, selRange); h_box->addWidget(&packet_range_group_box_); h_box->addWidget(&packet_format_group_box_, 0, Qt::AlignTop); -- cgit v1.2.3