From d81a34cc24598778d3f8073cf85027a777cbbc10 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 21 Jul 2014 16:14:53 -0700 Subject: [PATCH] Have the interface "tree" directly connect to ifListChanged. Then have the capture interfaces dialog connect only *its* code to update *its* list of interfaces to ifListChanged, rather than connecting a routine that then emits interfaceListChanged. This makes it the responsibility of each widget that displays local interfaces to connect to the ifListChanged signal. Change-Id: Iff8e8ca4202c8784eed58c8f05175d986a16baea Reviewed-on: https://code.wireshark.org/review/3153 Reviewed-by: Guy Harris --- ui/qt/capture_interfaces_dialog.cpp | 2 +- ui/qt/interface_tree.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index f1f9aab283..a11a46d0c0 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(ifListChanged()), this, SLOT(refreshInterfaceList())); + connect(wsApp, SIGNAL(ifListChanged()), this, SLOT(updateInterfaces())); } void CaptureInterfacesDialog::allFilterChanged() diff --git a/ui/qt/interface_tree.cpp b/ui/qt/interface_tree.cpp index 865d851c47..d725051cf6 100644 --- a/ui/qt/interface_tree.cpp +++ b/ui/qt/interface_tree.cpp @@ -65,6 +65,7 @@ InterfaceTree::InterfaceTree(QWidget *parent) : resizeColumnToContents(0); connect(wsApp, SIGNAL(appInitialized()), this, SLOT(getInterfaceList())); + connect(wsApp, SIGNAL(ifListChanged()), this, SLOT(interfaceListChanged())); connect(this, SIGNAL(itemSelectionChanged()), this, SLOT(updateSelectedInterfaces())); }