aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-09-15 14:37:26 +0200
committerRoland Knall <rknall@gmail.com>2019-09-15 19:01:00 +0000
commit2afc0257459962263738aa3a287fc86bf5fad497 (patch)
tree9f30f7e8e22e1a78ae1df9dd8b6edda2b9f19ed3
parentcacccb57db55965a556726dfdd7556c7c6afa066 (diff)
Qt: Add a comment to Apply+Prepare submenus
Add a comment to the Apply as Filter and Prepare as Filter menus, which displays the filter string selected for the menu Change-Id: I1bc3ecb849c51b3ffcbcc8ff18635a4df73ca27e Reviewed-on: https://code.wireshark.org/review/34534 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>
-rw-r--r--ui/qt/filter_action.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/filter_action.cpp b/ui/qt/filter_action.cpp
index ca884a8e95..7ac3daf217 100644
--- a/ui/qt/filter_action.cpp
+++ b/ui/qt/filter_action.cpp
@@ -228,6 +228,12 @@ QMenu * FilterAction::createFilterMenu(FilterAction::Action act, QString filter,
bool prepare = ( act == FilterAction::ActionApply) ? false : true;
QMenu * submenu = new QMenu(title, par);
+ if ( filter.length() > 0 )
+ {
+ QAction * comment = submenu->addAction(QString("%1: %2").arg(title).arg(filter));
+ comment->setEnabled(false);
+ submenu->addSeparator();
+ }
QActionGroup * group = FilterAction::createFilterGroup(filter, prepare, enabled, par);
submenu->addActions(group->actions());