From fdff1b3b18741e8608e1fbe13b5cf1e3add7a9d7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 21 Jul 2014 17:15:31 -0700 Subject: [PATCH] Don't connect to non-existent slots. (Run-time warning, not compile-time error, alas.) Change-Id: I002ca132d2c7cbc2cfd802438edb4509ff76bcbc Reviewed-on: https://code.wireshark.org/review/3155 Reviewed-by: Guy Harris --- ui/qt/capture_interfaces_dialog.cpp | 7 ++++++- ui/qt/capture_interfaces_dialog.h | 1 + ui/qt/main_window.cpp | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index ce6a04e45e..dc7ffcc251 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -73,7 +73,7 @@ CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget *parent) : connect(ui->allFilterComboBox, SIGNAL(captureFilterSyntaxChanged(bool)), this, SLOT(allFilterChanged())); connect(this, SIGNAL(interfacesChanged()), ui->allFilterComboBox, SIGNAL(interfacesChanged())); connect(this, SIGNAL(ifsChanged()), this, SLOT(refreshInterfaceList())); - connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(updateInterfaces())); + connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(updateLocalInterfaces())); } void CaptureInterfacesDialog::allFilterChanged() @@ -423,6 +423,11 @@ void CaptureInterfacesDialog::refreshInterfaceList() emit interfaceListChanged(); } +void CaptureInterfacesDialog::updateLocalInterfaces() +{ + UpdateInterfaces(); +} + void CaptureInterfacesDialog::updateStatistics(void) { QList *points = NULL; diff --git a/ui/qt/capture_interfaces_dialog.h b/ui/qt/capture_interfaces_dialog.h index 3febeca514..ec10941bcb 100644 --- a/ui/qt/capture_interfaces_dialog.h +++ b/ui/qt/capture_interfaces_dialog.h @@ -114,6 +114,7 @@ private slots: void updateStatistics(void); void allFilterChanged(); void refreshInterfaceList(); + void updateLocalInterfaces(); signals: void startCapture(); diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 873f904465..07e635979a 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -308,7 +308,6 @@ MainWindow::MainWindow(QWidget *parent) : this->main_welcome_->getInterfaceTree(), SLOT(setSelectedInterfaces())); connect(&capture_interfaces_dialog_, SIGNAL(interfaceListChanged()), this->main_welcome_->getInterfaceTree(), SLOT(interfaceListChanged())); - connect(wsApp, SIGNAL(localInterfaceListChanged()), this, SLOT(interfaceListChanged())); #endif main_ui_->mainStack->setCurrentWidget(main_welcome_);