Merge pull request #112 from mammonsama666/0410-dev

Fix: Lan list displayed incorrectly when connect lan with spacer in name.
This commit is contained in:
chenlelin 2021-04-13 10:49:13 +08:00 committed by GitHub
commit 0a531b4c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1564,7 +1564,8 @@ void MainWindow::getLanListDone(QStringList slist)
//**********************创建已经连接的有线网item********************//
if (currConnLanSsidUuidState.size() != 0) {//证明有已经连接的有线网络
for (int kk=0; kk<actLanSsidName.size(); kk++) {
if (nname == actLanSsidName.at(kk) && nuuid == actLanUuidName.at(kk) && actLanStateName.at(kk) == "connected") {
//actLanSsidName.at(kk).contains(nname)是为了防止名称中部分空格被trimmed()删除导致名称无法对应witch caused 显示错误
if ((nname == actLanSsidName.at(kk) || actLanSsidName.at(kk).contains(nname)) && nuuid == actLanUuidName.at(kk) && actLanStateName.at(kk) == "connected") {
topLanListWidget->resize(topLanListWidget->width(), topLanListWidget->height() + H_NORMAL_ITEM*kk);
isActiveNet = true; //名为nname的网络是已经连接的有线网络
ifLanConnected = true;