Merge branch 'main' into 'main'

#58278解决多次F9开启关闭wifi有几率出现 开启关闭再开启的现象

See merge request kylin-desktop/kylin-nm!5
This commit is contained in:
Zhang Jiaping 2021-06-02 07:21:14 +00:00
commit 2d0f3e1552
1 changed files with 2 additions and 2 deletions

View File

@ -1402,7 +1402,7 @@ void MainWindow::on_btnWifiList_clicked()
is_stop_check_net_state = 0;
} else {
qDebug()<<"debug: WiFi的开关已经关闭";
btnWireless->setSwitchStatus(false);
//btnWireless->setSwitchStatus(false);其他部分已经对关掉wifi开关进行处理此处不再处理。有几率出现打开关闭再打开的现象因此注释掉关闭的动作
delete topWifiListWidget; //清空top列表
createTopWifiUI(); //创建顶部无线网item
lbTopWifiList->hide();
@ -4301,7 +4301,7 @@ void MainWindow::onRfkillStatusChanged()
QThread *t = new QThread();
BackThread *bt = new BackThread();
bt->moveToThread(t);
btnWireless->setSwitchStatus(true);
btnWireless->setSwitchStatus(false);//此处逻辑应为关闭开关故应将true改为false
connect(t, SIGNAL(finished()), t, SLOT(deleteLater()));
connect(t, SIGNAL(started()), bt, SLOT(execDisWifi()));
connect(bt, SIGNAL(disWifiDone()), this, SLOT(rfkillDisableWifiDone()));