diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-11-22 12:58:43 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-11-26 16:01:52 +0000 |
commit | 449bc19ba9dd11431a3b4be547b1f37981fe77b9 (patch) | |
tree | 3456c576b2f14c42b8c1a4a48b135189f82787c0 /ui/qt/main.cpp | |
parent | 691f647acdfee71ef37453f146674999a2b43b6c (diff) |
Qt: support the -R option to set a read filter on the command line
rename display_filter to read_filter in some places to make it clear
what it's used for
modify MainWindow::openCaptureFile() so that a read filter can be set
when the file name is passed in cf_path, not only when it's chosen from
a file selection dialogue
don't display the read filter string in the filter toolbar
Change-Id: Ie8dc94cbd1ff7e61ce1e2a55518a28297daa5d51
Reviewed-on: https://code.wireshark.org/review/5446
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'ui/qt/main.cpp')
-rw-r--r-- | ui/qt/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp index 696a3dff71..183adf236a 100644 --- a/ui/qt/main.cpp +++ b/ui/qt/main.cpp @@ -502,7 +502,7 @@ int main(int argc, char *argv[]) char badopt; guint go_to_packet = 0; - QString dfilter; + QString dfilter, read_filter; cmdarg_err_init(wireshark_cmdarg_err, wireshark_cmdarg_err_cont); @@ -583,7 +583,6 @@ int main(int argc, char *argv[]) QString locale; QString cf_name; - QString display_filter; int optind_initial; unsigned int in_file_type = WTAP_TYPE_AUTO; @@ -1021,7 +1020,7 @@ int main(int argc, char *argv[]) cf_name = optarg; break; case 'R': /* Read file filter */ - /* Not supported yet */ + read_filter = QString(optarg); break; case 't': /* Time stamp type */ if (strcmp(optarg, "r") == 0) @@ -1348,7 +1347,7 @@ int main(int argc, char *argv[]) start_requested_stats(); // XXX The GTK+ UI does error checking here. - main_w->openCaptureFile(cf_name, display_filter, in_file_type); + main_w->openCaptureFile(cf_name, read_filter, in_file_type); if (!dfilter.isEmpty()) main_w->filterPackets(dfilter, false); if(go_to_packet != 0) { |