Merge branch 'y2209bug' into 'dbus-interface'

Fixbug 133311

See merge request kylin-desktop/kylin-nm!689
This commit is contained in:
赵世旭 2022-08-09 07:09:17 +00:00
commit c6c67d30bf
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();
}
}