forked from osmocom/wireshark
Revert "Copy selected lines from Packet List view for existing formats."
This reverts commit 13c5960a2c
.
Based on the features that needs integration of "multi-selection" (which this change introduced), it seems that there will be fair amount time and code changes required in packet_list.cpp and possibly other files.
I am reverting this change from the master branch so that people can still continue to use features with single-selection.
Meanwhile, Stig B and others ready to test can import this change to verify which features are missing integration and/or integrated correctly. Once the feature set integration is complete and there is fair amount of approval from all of you, the core committers can decide on it.
Change-Id: I106fd3c54350dd0fd85fc44743e7f5321cb04110
Reviewed-on: https://code.wireshark.org/review/33454
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
ee1dd899d0
commit
2331675eb5
|
@ -278,8 +278,6 @@ PacketList::PacketList(QWidget *parent) :
|
|||
this, SIGNAL(showProtocolPreferences(QString)));
|
||||
connect(&proto_prefs_menu_, SIGNAL(editProtocolPreference(preference*,pref_module*)),
|
||||
this, SIGNAL(editProtocolPreference(preference*,pref_module*)));
|
||||
|
||||
setSelectionMode(ExtendedSelection);
|
||||
}
|
||||
|
||||
void PacketList::colorsChanged()
|
||||
|
@ -1611,27 +1609,23 @@ void PacketList::copySummary()
|
|||
int copy_type = ca->data().toInt(&ok);
|
||||
if (!ok) return;
|
||||
|
||||
QString copy_text;
|
||||
QModelIndexList selectedRows = selectionModel()->selectedRows();
|
||||
qSort(selectedRows);
|
||||
|
||||
foreach(QModelIndex index, selectedRows) {
|
||||
QStringList col_parts;
|
||||
int row = index.row();
|
||||
int row = currentIndex().row();
|
||||
for (int col = 0; col < packet_list_model_->columnCount(); col++) {
|
||||
if (get_column_visible(col)) {
|
||||
col_parts << packet_list_model_->data(packet_list_model_->index(row, col), Qt::DisplayRole).toString();
|
||||
}
|
||||
}
|
||||
|
||||
QString copy_text;
|
||||
switch (copy_type) {
|
||||
case copy_summary_csv_:
|
||||
copy_text += "\"";
|
||||
copy_text = "\"";
|
||||
copy_text += col_parts.join("\",\"");
|
||||
copy_text += "\"";
|
||||
copy_text += "\n";
|
||||
break;
|
||||
case copy_summary_yaml_:
|
||||
copy_text += "----\n";
|
||||
copy_text = "----\n";
|
||||
copy_text += QString("# Packet %1 from %2\n").arg(row).arg(cap_file_->filename);
|
||||
copy_text += "- ";
|
||||
copy_text += col_parts.join("\n- ");
|
||||
|
@ -1639,11 +1633,8 @@ void PacketList::copySummary()
|
|||
break;
|
||||
case copy_summary_text_:
|
||||
default:
|
||||
copy_text += col_parts.join("\t");
|
||||
copy_text += "\n";
|
||||
copy_text = col_parts.join("\t");
|
||||
}
|
||||
}
|
||||
|
||||
wsApp->clipboard()->setText(copy_text);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue