Merge pull request #66 from mammonsama666/0112-dev

fix(active wifi): Activate wifi is empty when there is space in wifi name.
This commit is contained in:
chenlelin 2021-01-13 19:14:39 +08:00 committed by GitHub
commit 31e9cfd5d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1645,7 +1645,10 @@ void MainWindow::loadWifiListDone(QStringList slist)
});
connect(process, &QProcess::readyReadStandardOutput, this, [ = ]() {
QString str = process->readAllStandardOutput();
actWifissid = str.mid(str.lastIndexOf(" ") + 1, str.length() - str.lastIndexOf(" ") - 2);
actWifissid = str.mid(str.lastIndexOf(" ") + 1, str.length() - str.lastIndexOf(" ") - 2); //获取到ssid时以ssid为准
});
connect(process, &QProcess::readyReadStandardError, this, [ = ]() {
actWifissid = actWifiName; //没有获取到ssid时以wifi名为准
});
process->waitForFinished();
}