Fix:Solve the problem of abnormal display of activated list after failed to connect to enterprise WiFi

This commit is contained in:
king 2021-10-29 09:52:53 +08:00
parent f92b3d10d5
commit 68d6c0223b
1 changed files with 8 additions and 4 deletions

View File

@ -812,10 +812,14 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName
return;
}
deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid);
QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget);
m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem);
m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height());
if (m_activateConnectionItemMap.contains(ssid)) {
deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid);
QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget);
m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem);
m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height());
} else {
qDebug() << LOG_FLAG << ssid << "is not in activeconnection map";
}
KyWirelessNetItem wirelessNetItem;
bool ret = m_wirelessNetResource->getWifiNetwork(devName, ssid, wirelessNetItem);