aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/main_window_slots.cpp
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-08-26 15:30:22 +0200
committerRoland Knall <rknall@gmail.com>2019-08-26 19:39:14 +0000
commit3870e6c0365d90f53c89a3fb5537f1b9a4d6218e (patch)
treeb765b13948feeaebe8b73224c6cc3b055b457c4e /ui/qt/main_window_slots.cpp
parenta7838d940339fddd85d15cacd888369c1288b337 (diff)
Qt: Make Apply/Prepare filter independent
The context menu should only use information readily available at the point of creation. Copying actions from the mainwindow introduces a bunch of synchronization and consistency issues. This is a first step to move away from a centralized approach of managing actions, towards a distributed approach. As a side effect, this also solves the old issue of having the apply items greyed out in context menu Bug: 16001 Bug: 15323 Change-Id: I10c6df11cbab0a89386f5bf1d27759103df2a012 Reviewed-on: https://code.wireshark.org/review/34370 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r--ui/qt/main_window_slots.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 7b2cbb37a5..21a6d5477e 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -2609,7 +2609,12 @@ void MainWindow::matchFieldFilter(FilterAction::Action action, FilterAction::Act
return;
}
- emit filterAction(field_filter, action, filter_type);
+ setDisplayFilter(field_filter, action, filter_type);
+}
+
+void MainWindow::setDisplayFilter(QString filter, FilterAction::Action action, FilterAction::ActionType filterType)
+{
+ emit filterAction(filter, action, filterType);
}
void MainWindow::on_actionAnalyzeDisplayFilters_triggered()