Merge branch '180554' into 'yhkylin/v101'

fix bug 180554 【WiFi】存有两个wifi信息的情况下,将其中一个ssid改为空格,点击保存,任务栏wifi连接状态未刷新

See merge request kylinos-src/kylin-nm!210
This commit is contained in:
赵世旭 2023-07-11 09:26:57 +00:00
commit 723d1c7437
1 changed files with 19 additions and 0 deletions

View File

@ -1053,6 +1053,25 @@ void WlanPage::onConnectionStateChanged(QString uuid,
return;
}
if (state == NetworkManager::ActiveConnection::State::Deactivating ||
state == NetworkManager::ActiveConnection::State::Deactivated) {
if (!m_activateConnectionItemMap.contains(ssid)) {
//check uuid
QMap<QString, QListWidgetItem*>::iterator iter;
for(iter = m_activateConnectionItemMap.begin(); iter!= m_activateConnectionItemMap.end(); iter++)
{
if(iter.value() != nullptr) {
QListWidgetItem *p_listWidgetItem = iter.value();
WlanListItem *p_wlanItem = (WlanListItem*)m_activatedNetListWidget->itemWidget(p_listWidgetItem);
if (p_wlanItem->getUuid() == uuid) {
ssid = p_wlanItem->getSsid();
break;
}
}
}
}
}
qDebug()<< "[WlanPage] wlan state changed, ssid = " << ssid
<< "; state = " << state << "; reason = " << reason << Q_FUNC_INFO <<__LINE__;
if (state == NetworkManager::ActiveConnection::State::Activated) {