summaryrefslogtreecommitdiff
path: root/ui/qt
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/main_welcome.cpp7
-rw-r--r--ui/qt/main_window.cpp4
-rw-r--r--ui/qt/main_window_slots.cpp12
3 files changed, 18 insertions, 5 deletions
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp
index 6001639d39..fe28da06e6 100644
--- a/ui/qt/main_welcome.cpp
+++ b/ui/qt/main_welcome.cpp
@@ -256,6 +256,7 @@ void MainWelcome::appInitialized()
splash_overlay_ = NULL;
}
+#ifdef HAVE_LIBPCAP
// Update each selected device cfilter when the user changes the contents
// of the capture filter lineedit. We do so here so that we don't clobber
// filters set in the Capture Options / Interfaces dialog or ones set via
@@ -287,6 +288,12 @@ void MainWelcome::captureFilterTextEdited(const QString capture_filter)
}
welcome_ui_->interfaceTree->updateToolTips();
}
+#else
+// No-op if we don't have capturing.
+void MainWelcome::captureFilterTextEdited(const QString)
+{
+}
+#endif
// The interface list selection has changed. At this point the user might
// have entered a filter or we might have pre-filled one from a number of
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 78f062a2b3..519bbacabd 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -246,10 +246,12 @@ simple_message_box(ESD_TYPE_E type, gboolean *notagain,
void
vsimple_error_message_box(const char *msg_format, va_list ap)
{
+#ifdef HAVE_LIBPCAP
// We want to quit after reading the capture file, hence
// we don't actually open the error dialog.
- if (global_capture_opts.quit_after_cap)
+ if (quit_after_cap)
exit(0);
+#endif
SimpleDialog sd(gbl_cur_main_window_, ESD_TYPE_ERROR, ESD_BTN_OK, msg_format, ap);
sd.exec();
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 881460dca5..131e77bfd1 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -262,8 +262,10 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned
main_ui_->statusBar->showExpert();
finish:
- if (global_capture_opts.quit_after_cap)
+#ifdef HAVE_LIBPCAP
+ if (quit_after_cap)
exit(0);
+#endif
return ret;
}
@@ -621,7 +623,7 @@ void MainWindow::captureCaptureUpdateFinished(capture_session *) {
setWindowIcon(wsApp->normalIcon());
- if (global_capture_opts.quit_after_cap) {
+ if (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);
@@ -644,7 +646,7 @@ void MainWindow::captureCaptureFixedFinished(capture_session *) {
setWindowIcon(wsApp->normalIcon());
- if (global_capture_opts.quit_after_cap) {
+ if (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);
@@ -668,7 +670,7 @@ void MainWindow::captureCaptureFailed(capture_session *) {
setWindowIcon(wsApp->normalIcon());
- if (global_capture_opts.quit_after_cap) {
+ if (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);
@@ -780,8 +782,10 @@ void MainWindow::captureFileClosed() {
setMenusForSelectedPacket();
setMenusForSelectedTreeRow();
+#ifdef HAVE_LIBPCAP
if (!global_capture_opts.multi_files_on)
main_ui_->mainStack->setCurrentWidget(main_welcome_);
+#endif
}
void MainWindow::captureFileSaveStarted(const QString &file_path)