Merge branch '2309-0822' into 'yhkylin/v101'
fix(托盘WLAN): 避免重复添加相同SSID的WiFi(bug#188238) See merge request kylinos-src/kylin-nm!248
This commit is contained in:
commit
ac8fb3aa15
|
@ -404,6 +404,12 @@ void KyWirelessNetResource::onWifiNetworkAdded(QString devIfaceName, QString ssi
|
|||
KyWirelessNetItem item(wifi);
|
||||
|
||||
if (m_WifiNetworkList.contains(devIfaceName)) {
|
||||
for (int index = 0; index < m_WifiNetworkList[devIfaceName].size(); ++index) {
|
||||
if (m_WifiNetworkList[devIfaceName].at(index).m_NetSsid == item.m_NetSsid) {
|
||||
m_WifiNetworkList[devIfaceName].removeAt(index);
|
||||
index--;
|
||||
}
|
||||
}
|
||||
m_WifiNetworkList[devIfaceName].append(item);
|
||||
} else {
|
||||
QList<KyWirelessNetItem> list;
|
||||
|
|
|
@ -637,6 +637,7 @@ void WlanPage::onWlanRemoved(QString interface, QString ssid)
|
|||
|
||||
QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget);
|
||||
m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem);
|
||||
m_activatedNetListWidget->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue