Fixbug 133311

This commit is contained in:
zhangyuanyuan1 2022-08-05 15:21:44 +08:00
parent b37de39bf2
commit f0b951022b
2 changed files with 26 additions and 0 deletions

View File

@ -381,6 +381,19 @@ void LanPage::constructActiveConnectionArea()
QListWidgetItem *p_listWidgetItem = addNewItem(p_activeConnectionItem, m_activatedLanListWidget);
m_activeConnectionMap.insert(p_activeConnectionItem->m_connectUuid, p_listWidgetItem);
int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(p_activeConnectionItem->m_connectUuid);
if (configType == -1) {
NetworkModeConfig::getInstance()->setNetworkModeConfig(p_activeConnectionItem->m_connectUuid,
m_currentDeviceName,
p_activeConnectionItem->m_connectName,
KSC_FIREWALL_PUBLIC);
} else {
NetworkModeConfig::getInstance()->setNetworkModeConfig(p_activeConnectionItem->m_connectUuid,
m_currentDeviceName,
p_activeConnectionItem->m_connectName,
configType);
}
delete p_activeConnectionItem;
p_activeConnectionItem = nullptr;
}

View File

@ -425,6 +425,19 @@ void WlanPage::constructActivateConnectionArea()
m_activateConnectionItemMap.insert(wirelessNetItem.m_NetSsid, p_listWidgetItem);
updateWlanItemState(m_activatedNetListWidget, p_listWidgetItem, Activated);
int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(wirelessNetItem.m_connectUuid);
if (configType == -1) {
NetworkModeConfig::getInstance()->setNetworkModeConfig(wirelessNetItem.m_connectUuid,
m_currentDevice,
wirelessNetItem.m_connName,
KSC_FIREWALL_PUBLIC);
} else {
NetworkModeConfig::getInstance()->setNetworkModeConfig(wirelessNetItem.m_connectUuid,
m_currentDevice,
wirelessNetItem.m_connName,
configType);
}
height += p_listWidgetItem->sizeHint().height();
}
}