forked from osmocom/wireshark
Qt: Keep dialogs from blocking tests.
If WIRESHARK_QUIT_AFTER_CAPTURE is set, call exit(0). This keeps us from emitting the aboutToQuit signal and doing things that might pop up dialogs. Change-Id: I6e986b6e7ad824d8b5258e34a12c32869f5b2d34 Reviewed-on: https://code.wireshark.org/review/4421 Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
abfa0911f7
commit
c0cdf9473a
|
@ -420,9 +420,9 @@ void MainWindow::captureCaptureUpdateFinished(capture_session *cap_session) {
|
||||||
setWindowIcon(wsApp->normalIcon());
|
setWindowIcon(wsApp->normalIcon());
|
||||||
|
|
||||||
if (global_capture_opts.quit_after_cap) {
|
if (global_capture_opts.quit_after_cap) {
|
||||||
/* command line asked us to quit after the capture */
|
// Command line asked us to quit after capturing.
|
||||||
/* don't pop up a dialog to ask for unsaved files etc. */
|
// Don't pop up a dialog to ask for unsaved files etc.
|
||||||
wsApp->quit();
|
exit(0);
|
||||||
}
|
}
|
||||||
#endif // HAVE_LIBPCAP
|
#endif // HAVE_LIBPCAP
|
||||||
}
|
}
|
||||||
|
@ -445,9 +445,9 @@ void MainWindow::captureCaptureFixedFinished(capture_session *cap_session) {
|
||||||
setWindowIcon(wsApp->normalIcon());
|
setWindowIcon(wsApp->normalIcon());
|
||||||
|
|
||||||
if (global_capture_opts.quit_after_cap) {
|
if (global_capture_opts.quit_after_cap) {
|
||||||
/* command line asked us to quit after the capture */
|
// Command line asked us to quit after capturing.
|
||||||
/* don't pop up a dialog to ask for unsaved files etc. */
|
// Don't pop up a dialog to ask for unsaved files etc.
|
||||||
wsApp->quit();
|
exit(0);
|
||||||
}
|
}
|
||||||
#endif // HAVE_LIBPCAP
|
#endif // HAVE_LIBPCAP
|
||||||
}
|
}
|
||||||
|
@ -471,9 +471,9 @@ void MainWindow::captureCaptureFailed(capture_session *cap_session) {
|
||||||
setWindowIcon(wsApp->normalIcon());
|
setWindowIcon(wsApp->normalIcon());
|
||||||
|
|
||||||
if (global_capture_opts.quit_after_cap) {
|
if (global_capture_opts.quit_after_cap) {
|
||||||
/* command line asked us to quit after the capture */
|
// Command line asked us to quit after capturing.
|
||||||
/* don't pop up a dialog to ask for unsaved files etc. */
|
// Don't pop up a dialog to ask for unsaved files etc.
|
||||||
wsApp->quit();
|
exit(0);
|
||||||
}
|
}
|
||||||
#endif // HAVE_LIBPCAP
|
#endif // HAVE_LIBPCAP
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,8 +533,7 @@ void WiresharkApplication::clearRecentItems() {
|
||||||
void WiresharkApplication::cleanup()
|
void WiresharkApplication::cleanup()
|
||||||
{
|
{
|
||||||
software_update_cleanup();
|
software_update_cleanup();
|
||||||
/* write user's recent file to disk
|
// Write the user's recent file(s) to disk.
|
||||||
* It is no problem to write this file, even if we do not quit */
|
|
||||||
write_profile_recent();
|
write_profile_recent();
|
||||||
write_recent();
|
write_recent();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue