Fix bug can not reconnect wifi if show wired interface

This commit is contained in:
you name 2021-03-30 14:32:52 +08:00
parent 691c408bb4
commit e4580344de
2 changed files with 13 additions and 8 deletions

View File

@ -786,7 +786,6 @@ int KylinDBus::getWiredNetworkNumber()
for(QString key : map.keys() ) {
if (key == "802-3-ethernet") {
wiredNetworkNumber += 1;
qDebug()<<"A new wired network was created.";
}
}
}

View File

@ -1698,10 +1698,6 @@ void MainWindow::onRequestRevalueUpdateWifi()
// 获取wifi列表回调
void MainWindow::getWifiListDone(QStringList slist)
{
if (this->is_btnLanList_clicked == 1) {
return;
}
//qDebug()<<"------------";
//foreach (QString str, slist) {
// qDebug()<<str;
@ -1753,15 +1749,25 @@ void MainWindow::getWifiListDone(QStringList slist)
});
}
}
} else if (current_wifi_list_state == LOAD_WIFI_LIST) {
current_wifi_list_state = LOAD_WIFI_LIST;
}
if (this->is_btnLanList_clicked == 1) {
return;
}
if (current_wifi_list_state == LOAD_WIFI_LIST) {
//qDebug() << "loadwifi的列表";
loadWifiListDone(slist);
is_init_wifi_list = 0;
} else {
}
if (current_wifi_list_state == UPDATE_WIFI_LIST) {
//qDebug() << "updatewifi的列表";
updateWifiListDone(slist);
current_wifi_list_state = LOAD_WIFI_LIST;
}
current_wifi_list_state = LOAD_WIFI_LIST;
oldWifiSlist = slist;
}