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

This commit is contained in:
jzxc95 2023-07-10 17:01:53 +08:00
parent 9b1a6ed684
commit 35409e86ae
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) {