Qt: Show all column types in context menu

Show all column types in the column context menu to improve usability
even more when show/hide columns. This is a follow-up to the improvement
to show custom column field names.

Change-Id: I0838c7ae6eec59960a0a70b485c372855e242dc0
Reviewed-on: https://code.wireshark.org/review/35206
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
Stig Bjørlykke 2019-11-25 10:48:10 +01:00 committed by Roland Knall
parent 40897b0234
commit 6433e12474
1 changed files with 3 additions and 1 deletions

View File

@ -206,7 +206,9 @@ void PacketListHeader::contextMenuEvent(QContextMenuEvent *event)
for (int cnt = 0; cnt < prefs.num_cols; cnt++) {
QString title(get_column_title(cnt));
if (get_column_format(cnt) == COL_CUSTOM) {
title.append(QString("\t(%1)").arg(get_column_custom_fields(cnt)));
title.append(QString("\t%1").arg(get_column_custom_fields(cnt)));
} else {
title.append(QString("\t%1").arg(col_format_desc(get_column_format(cnt))));
}
QAction *action = new QAction(title, this);
action->setCheckable(true);