From 85c34b70df16aeef8e41de06c7e23fac400ef60d Mon Sep 17 00:00:00 2001 From: xuechao chen Date: Fri, 30 Jun 2023 17:07:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=A7=BB=E5=8A=A8=E7=83=AD?= =?UTF-8?q?=E7=82=B9=E9=85=8D=E7=BD=AE=E7=9A=84=E7=BD=91=E5=8D=A1=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=90=8E=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mobilehotspot/mobilehotspotwidget.cpp | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/plugins/mobilehotspot/mobilehotspotwidget.cpp b/plugins/mobilehotspot/mobilehotspotwidget.cpp index bccbc4f8..139f4326 100644 --- a/plugins/mobilehotspot/mobilehotspotwidget.cpp +++ b/plugins/mobilehotspot/mobilehotspotwidget.cpp @@ -450,32 +450,34 @@ void MobileHotspotWidget::getApInfo() m_pwdNameLine->setText("12345678"); return; } else { + m_apNameLine->setText(apInfo.at(0)); + m_pwdNameLine->setText(apInfo.at(1)); + int index = m_interfaceComboBox->findText(apInfo.at(2)); if (index >= 0) { - m_apNameLine->setText(apInfo.at(0)); - m_pwdNameLine->setText(apInfo.at(1)); m_interfaceComboBox->setCurrentIndex(index); m_interfaceName = apInfo.at(2); - if (apInfo.at(3) == "true") { - m_switchBtn->setChecked(true); - setUiEnabled(true); - m_uuid = apInfo.at(4); - } else { - m_switchBtn->setChecked(false); - setUiEnabled(false); - m_uuid = apInfo.at(4); - } - int i = m_freqBandComboBox->findText(apInfo.at(5)); - if (i >= 0) { - disconnect(m_freqBandComboBox); - m_freqBandComboBox->setCurrentIndex(i); - connect(m_freqBandComboBox, QOverload::of(&QComboBox::currentIndexChanged), [=](){ - UkccCommon::buriedSettings("MobileHotspot", "Frequency band", QString("select"), m_freqBandComboBox->currentText()); - }); - } } else { qDebug() << LOG_HEAD << "no such interface " << apInfo.at(2); } + + if (apInfo.at(3) == "true") { + m_switchBtn->setChecked(true); + setUiEnabled(true); + m_uuid = apInfo.at(4); + } else { + m_switchBtn->setChecked(false); + setUiEnabled(false); + m_uuid = apInfo.at(4); + } + int i = m_freqBandComboBox->findText(apInfo.at(5)); + if (i >= 0) { + disconnect(m_freqBandComboBox); + m_freqBandComboBox->setCurrentIndex(i); + connect(m_freqBandComboBox, QOverload::of(&QComboBox::currentIndexChanged), [=](){ + UkccCommon::buriedSettings("MobileHotspot", "Frequency band", QString("select"), m_freqBandComboBox->currentText()); + }); + } } }