diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-06-27 18:40:09 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-06-28 01:40:39 +0000 |
commit | 5d019cfb13a75663f5fde39163650884208e5791 (patch) | |
tree | 516164ad9c97613664871aad584ae789e2f032bf /ui/qt/main_window_slots.cpp | |
parent | 3f49e897f674008c27de9833b8ba2d119dc22ef4 (diff) |
Make quit_after_cap an item in commandline_param_info_t.
And make the commandline_info structure global, so all the places that
look at quit_after_cap can get at it.
Change-Id: I006329cf8842c655cca36f024570855d1b16e107
Reviewed-on: https://code.wireshark.org/review/16182
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/main_window_slots.cpp')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 131e77bfd1..fcd3774daa 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -34,6 +34,8 @@ #include <windows.h> #endif +#include "ui/commandline.h" + #ifdef HAVE_LIBPCAP #include "ui/capture.h" #endif @@ -263,7 +265,7 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned finish: #ifdef HAVE_LIBPCAP - if (quit_after_cap) + if (global_commandline_info.quit_after_cap) exit(0); #endif return ret; @@ -623,7 +625,7 @@ void MainWindow::captureCaptureUpdateFinished(capture_session *) { setWindowIcon(wsApp->normalIcon()); - if (quit_after_cap) { + if (global_commandline_info.quit_after_cap) { // Command line asked us to quit after capturing. // Don't pop up a dialog to ask for unsaved files etc. exit(0); @@ -646,7 +648,7 @@ void MainWindow::captureCaptureFixedFinished(capture_session *) { setWindowIcon(wsApp->normalIcon()); - if (quit_after_cap) { + if (global_commandline_info.quit_after_cap) { // Command line asked us to quit after capturing. // Don't pop up a dialog to ask for unsaved files etc. exit(0); @@ -670,7 +672,7 @@ void MainWindow::captureCaptureFailed(capture_session *) { setWindowIcon(wsApp->normalIcon()); - if (quit_after_cap) { + if (global_commandline_info.quit_after_cap) { // Command line asked us to quit after capturing. // Don't pop up a dialog to ask for unsaved files etc. exit(0); |