diff options
author | Gerald Combs <gerald@wireshark.org> | 2014-10-01 12:44:14 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-10-01 22:30:33 +0000 |
commit | 58cde5c74accbb7ad843e4b97e64c2b9f74b8854 (patch) | |
tree | 52808e0e80d4c7c7621960d392f4dc0b1e049464 /ui/qt | |
parent | b5aa0d2a4f6b70c16323e5ea69412c3cc861379e (diff) |
Add tests for the Qt UI.
Make sure the Qt UI quits if WIRESHARK_QUIT_AFTER_CAPTURE is set. Make
sure Bourne shell scripts (*.sh) have UNIX/POSIX line endings. Reduce
some time values so that the tests run faster.
Change-Id: I81df7c6f72d7d807d1856863cbea1bb6326ca711
Reviewed-on: https://code.wireshark.org/review/4407
Tested-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/main.cpp | 2 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp index c742bbaf6f..30f3d37a32 100644 --- a/ui/qt/main.cpp +++ b/ui/qt/main.cpp @@ -298,7 +298,7 @@ print_usage(gboolean for_help_option) { #ifndef _WIN32 fprintf(output, " --display=DISPLAY X display to use\n"); #endif - fprintf(output, "\nNOTE: Not all options are already implemented in the QT port.\n"); + fprintf(output, "\nNOTE: Not all options are implemented in the Qt port.\n"); #ifdef _WIN32 destroy_console(); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index e1b47791f9..b1951028aa 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -418,6 +418,12 @@ void MainWindow::captureCaptureUpdateFinished(capture_session *cap_session) { setForCaptureInProgress(false); setWindowIcon(wsApp->normalIcon()); + + if (global_capture_opts.quit_after_cap) { + /* command line asked us to quit after the capture */ + /* don't pop up a dialog to ask for unsaved files etc. */ + wsApp->quit(); + } #endif // HAVE_LIBPCAP } void MainWindow::captureCaptureFixedStarted(capture_session *cap_session) { @@ -437,6 +443,12 @@ void MainWindow::captureCaptureFixedFinished(capture_session *cap_session) { setForCaptureInProgress(false); setWindowIcon(wsApp->normalIcon()); + + if (global_capture_opts.quit_after_cap) { + /* command line asked us to quit after the capture */ + /* don't pop up a dialog to ask for unsaved files etc. */ + wsApp->quit(); + } #endif // HAVE_LIBPCAP } void MainWindow::captureCaptureStopping(capture_session *cap_session) { @@ -457,6 +469,12 @@ void MainWindow::captureCaptureFailed(capture_session *cap_session) { main_ui_->mainStack->setCurrentWidget(main_welcome_); setWindowIcon(wsApp->normalIcon()); + + if (global_capture_opts.quit_after_cap) { + /* command line asked us to quit after the capture */ + /* don't pop up a dialog to ask for unsaved files etc. */ + wsApp->quit(); + } #endif // HAVE_LIBPCAP } |