From 00e1642cc81115c06a27f92b3b355696111b4639 Mon Sep 17 00:00:00 2001 From: zhangjiaping Date: Wed, 9 Jun 2021 19:50:29 +0800 Subject: [PATCH] Optimize code. --- src/oneconnform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oneconnform.cpp b/src/oneconnform.cpp index e7bda6e4..a8b82acc 100644 --- a/src/oneconnform.cpp +++ b/src/oneconnform.cpp @@ -779,7 +779,7 @@ void OneConnForm::toConnectWirelessNetwork() } toConnectWirelessNetwork(); return; - } else if (QString::compare(key_mgmt, cur_secu) != 0) { + } else if (!key_mgmt.isEmpty() && QString::compare(key_mgmt, cur_secu) != 0) { //原配置文件与当前加密方式不一致,删掉,请求输入新的密码 QString cmdStr = "nmcli connection delete \"" + wifiName + "\""; Utils::m_system(cmdStr.toUtf8().data());