From 988fcfac5aebf2151523583ed108ea0fcb61f640 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 6 Nov 2020 01:27:36 +0000 Subject: [PATCH] Ensure network interfaces validation is run on start up --- Configuration.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 7bd94b5d4..4674087b0 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -444,7 +444,7 @@ private: void update_audio_channels (QComboBox const *, int, QComboBox *, bool); void load_network_interfaces (CheckableItemComboBox *, QStringList current); - void validate_network_interfaces (CheckableItemComboBox *); + Q_SLOT void validate_network_interfaces (QString const&); QStringList get_selected_network_interfaces (CheckableItemComboBox *); Q_SLOT void host_info_results (QHostInfo); void check_multicast (QHostAddress const&); @@ -1087,9 +1087,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network load_network_interfaces (ui_->udp_interfaces_combo_box, udp_interface_names_); QGuiApplication::restoreOverrideCursor (); }); - connect (ui_->udp_interfaces_combo_box, &QComboBox::currentTextChanged, [this] (QString const& /*text*/) { - validate_network_interfaces (ui_->udp_interfaces_combo_box); - }); + connect (ui_->udp_interfaces_combo_box, &QComboBox::currentTextChanged, this, &Configuration::impl::validate_network_interfaces); // set up LoTW users CSV file fetching connect (&lotw_users_, &LotWUsers::load_finished, [this] () { @@ -3037,9 +3035,9 @@ void Configuration::impl::load_network_interfaces (CheckableItemComboBox * combo } // get the select network interfaces from the selection combo box -void Configuration::impl::validate_network_interfaces (CheckableItemComboBox * combo_box) +void Configuration::impl::validate_network_interfaces (QString const& /*text*/) { - auto model = static_cast (combo_box->model ()); + auto model = static_cast (ui_->udp_interfaces_combo_box->model ()); bool has_checked {false}; int loopback_row {-1}; for (int row = 0; row < model->rowCount (); ++row)