Merge branch '1029' into 'dbus-interface'
bug#86526 See merge request kylin-desktop/kylin-nm!372
This commit is contained in:
commit
a6385eb788
|
@ -860,23 +860,27 @@ void WlanPage::onConnectionStateChanged(QString uuid,
|
|||
qDebug()<< "[WlanPage] wlan state changed, ssid = " << ssid
|
||||
<< "; state = " << state << "; reason = " << reason << Q_FUNC_INFO <<__LINE__;
|
||||
if (state == NetworkManager::ActiveConnection::State::Activated) {
|
||||
m_updateStrength = true;
|
||||
updateActivatedArea(uuid, ssid, devName);
|
||||
if (m_activateConnectionItemMap.contains(ssid)) {
|
||||
QListWidgetItem *p_listWidgetItem = m_activateConnectionItemMap.value(ssid);
|
||||
updateWlanItemState(m_activatedNetListWidget, p_listWidgetItem, Activated);
|
||||
}
|
||||
} else if (state == NetworkManager::ActiveConnection::State::Deactivated) {
|
||||
m_updateStrength = true;
|
||||
updateWirelessNetArea(uuid, ssid, devName);
|
||||
if (m_wirelessNetItemMap.contains(ssid)) {
|
||||
QListWidgetItem *p_listWidgetItem = m_wirelessNetItemMap.value(ssid);
|
||||
updateWlanItemState(m_inactivatedNetListWidget, p_listWidgetItem, Deactivated);
|
||||
}
|
||||
} else if (state == NetworkManager::ActiveConnection::State::Deactivating){
|
||||
m_updateStrength = false;
|
||||
if (m_activateConnectionItemMap.contains(ssid)) {
|
||||
QListWidgetItem *p_listWidgetItem = m_activateConnectionItemMap.value(ssid);
|
||||
updateWlanItemState(m_activatedNetListWidget, p_listWidgetItem, Deactivating);
|
||||
}
|
||||
} else if (state == NetworkManager::ActiveConnection::State::Activating) {
|
||||
m_updateStrength = false;
|
||||
if (m_wirelessNetItemMap.contains(ssid)) {
|
||||
QListWidgetItem *p_listWidgetItem = m_wirelessNetItemMap.value(ssid);
|
||||
updateWlanItemState(m_inactivatedNetListWidget, p_listWidgetItem, Activating);
|
||||
|
@ -1007,6 +1011,10 @@ void WlanPage::onRefreshIconTimer()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!m_updateStrength) {
|
||||
return;
|
||||
}
|
||||
|
||||
QString activateSsid = m_activateConnectionItemMap.firstKey();
|
||||
int sortRow = 0;
|
||||
for (int index = 0; index < wlanList.length(); index++) {
|
||||
|
|
|
@ -166,6 +166,8 @@ private:
|
|||
QGSettings *m_switchGsettings = nullptr;
|
||||
bool m_wlanSwitchEnable = true;
|
||||
|
||||
bool m_updateStrength = true;
|
||||
|
||||
QTimer *m_scanTimer = nullptr;
|
||||
QTimer *m_refreshIconTimer = nullptr;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue