Qt: Fix a "No such slot" warning.
authorGerald Combs <gerald@wireshark.org>
Fri, 11 Nov 2016 16:48:33 +0000 (08:48 -0800)
committerGerald Combs <gerald@wireshark.org>
Fri, 11 Nov 2016 17:36:52 +0000 (17:36 +0000)
Make sure on_actionCaptureOptions_triggered always exists so that we
don't get a "No such slot" warning when building without libpcap.

Change-Id: Ib7c82df6c72bf080ff080e0a650216b345a97e9c
Reviewed-on: https://code.wireshark.org/review/18747
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
ui/qt/main_window.h
ui/qt/main_window_slots.cpp

index 5c2a77a28c7e3c9d06097184556c6b2c39d94c22..5320fc7f13e6b231e30704ba107e4ceeafc462b0 100644 (file)
@@ -465,8 +465,8 @@ private slots:
     void on_actionGoAutoScroll_toggled(bool checked);
     void resetPreviousFocus();
 
-#ifdef HAVE_LIBPCAP
     void on_actionCaptureOptions_triggered();
+#ifdef HAVE_LIBPCAP
     void on_actionCaptureRefreshInterfaces_triggered();
 #endif
     void on_actionCaptureCaptureFilters_triggered();
index c42a8b4d5935b2329b3723352f884c271e0bfad7..1b2ac37c11bd860a168a9ed6339c604390bda34f 100644 (file)
@@ -3642,9 +3642,9 @@ void MainWindow::on_actionStatisticsProtocolHierarchy_triggered()
     phd->show();
 }
 
-#ifdef HAVE_LIBPCAP
 void MainWindow::on_actionCaptureOptions_triggered()
 {
+#ifdef HAVE_LIBPCAP
     if (!capture_interfaces_dialog_) {
         capture_interfaces_dialog_ = new CaptureInterfacesDialog(this);
 
@@ -3676,8 +3676,10 @@ void MainWindow::on_actionCaptureOptions_triggered()
 
     capture_interfaces_dialog_->raise();
     capture_interfaces_dialog_->activateWindow();
+#endif
 }
 
+#ifdef HAVE_LIBPCAP
 void MainWindow::on_actionCaptureRefreshInterfaces_triggered()
 {
     main_ui_->actionCaptureRefreshInterfaces->setEnabled(false);