diff --git a/mainwindow.cpp b/mainwindow.cpp index 3380cdb8..5825ee10 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1071,11 +1071,19 @@ void MainWindow::on_btnNetList_clicked(int flag) this->startLoading(); this->ksnm->execGetLanList(); } else { - syslog(LOG_DEBUG, "btnNetList is clicked, but the return value of checkLanOn() is false"); - qDebug()<<"debug: btnNetList is clicked, but the return value of checkLanOn() is false"; + QString strSlist; + system("nmcli connection show -active>/tmp/kylin-nm-connshow"); + QFile file("/tmp/kylin-nm-connshow"); + if(!file.open(QIODevice::ReadOnly | QIODevice::Text)){ + syslog(LOG_DEBUG, "Can't open the file /tmp/kylin-nm-connshow!"); + qDebug()<<"Can't open the file /tmp/kylin-nm-connshow!"; + } + QString txt = file.readAll(); + if (txt.indexOf("ethernet") != -1){ + QString txt(tr("Abnormal connection exist, program will delete it"));//仍然有连接异常的有线网络,断开异常连接的网络 + QString cmd = "export LANG='en_US.UTF-8';export LANGUAGE='en_US';notify-send '" + txt + "...' -t 3800"; + system(cmd.toUtf8().data()); - //if (objKyDBus->getLanConnState() == 0){ - if (true){ BackThread *btn_bt = new BackThread(); btn_bt->lanDelete(); sleep(1); @@ -1083,6 +1091,9 @@ void MainWindow::on_btnNetList_clicked(int flag) sleep(1); btn_bt->lanDelete(); btn_bt->deleteLater(); + + on_btnNetList_clicked(0); + return; } // 清空lan列表 diff --git a/translations/kylin-nm_bo.ts b/translations/kylin-nm_bo.ts index 4d39c90a..30be1546 100644 --- a/translations/kylin-nm_bo.ts +++ b/translations/kylin-nm_bo.ts @@ -85,67 +85,67 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Cancel - + Connect - + C_reate… - + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise @@ -158,77 +158,77 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Username - + Password - + Cancel - + Connect - + C_reate… - + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise @@ -241,128 +241,128 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Authentication - + Anonymous identity - + Allow automatic PAC pro_visioning - + PAC file - + Inner authentication - + Username - + Password - + Cancel - + Connect - + C_reate… - - + + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + Tunneled TLS - + Protected EAP (PEAP) - + Anonymous - + Authenticated - + Both @@ -375,92 +375,92 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Authentication - + Username - + Password - + Cancel - + Connect - + C_reate… - + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + Tunneled TLS - + Protected EAP (PEAP) @@ -473,143 +473,143 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Authentication - + Anonymous identity - + Domain - + CA certificate - + CA certificate password - + No CA certificate is required - + PEAP version - + Inner authentication - + Username - + Password - + Cancel - + Connect - - + + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + Tunneled TLS - + Protected EAP (PEAP) - + Choose from file - + Automatic - + Version 0 - + Version 1 @@ -622,92 +622,92 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Authentication - + Username - + Password - + Cancel - + Connect - + C_reate… - + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + Tunneled TLS - + Protected EAP (PEAP) @@ -720,137 +720,137 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Authentication - + Identity - + Domain - + CA certificate - + CA certificate password - + No CA certificate is required - + User certificate - + User certificate password - + User private key - + User key password - + Cancel - + Connect - + C_reate… - - - - + + + + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + Tunneled TLS - + Protected EAP (PEAP) - - - + + + Choose from file @@ -863,128 +863,128 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Authentication - + Anonymous identity - + Domain - + CA certificate - + CA certificate password - + No CA certificate is required - + Inner authentication - + Username - + Password - + Cancel - + Connect - + C_reate… - - + + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + Tunneled TLS - + Protected EAP (PEAP) - + Choose from file @@ -997,97 +997,97 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Key - + WEP index - + Authentication - + Cancel - + Connect - + C_reate… - + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise - + 1(default) - + Open System - + Shared Key @@ -1100,72 +1100,72 @@ - + Add hidden Wi-Fi - + Connection - + Network name - + Wi-Fi security - + Password - + Cancel - + Connect - + C_reate… - + None - + WPA & WPA2 Personal - + WEP 40/128-bit Key (Hex or ASCII) - + WEP 128-bit Passphrase - + Dynamic WEP (802.1X) - + WPA & WPA2 Enterprise @@ -1199,90 +1199,95 @@ - - - - - - + + + + + + Enabled - - - - - - - - + + + + + + + + Disabled - - - - - - - + + + + + + + Not connected - - - - - - - + + + + + + + Disconnected - - - + + + Ethernet Networks - - + + Connected - - + + Wifi Networks - + keep wired network switch is on before turning on wireless switch - + please insert the wireless network adapter - + + Abnormal connection exist, program will delete it + + + + Conn Ethernet Success - + Conn Ethernet Fail - + Conn Wifi Success diff --git a/translations/kylin-nm_zh_CN.qm b/translations/kylin-nm_zh_CN.qm index 6df74843..31e52a2e 100644 Binary files a/translations/kylin-nm_zh_CN.qm and b/translations/kylin-nm_zh_CN.qm differ diff --git a/translations/kylin-nm_zh_CN.ts b/translations/kylin-nm_zh_CN.ts index f0a054e6..51181cf0 100644 --- a/translations/kylin-nm_zh_CN.ts +++ b/translations/kylin-nm_zh_CN.ts @@ -80,67 +80,67 @@ DlgConnHidWifi - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 @@ -158,77 +158,77 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Username 用户名: - + Password 密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 @@ -241,128 +241,128 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Authentication 认证: - + Anonymous identity 匿名身份: - + Allow automatic PAC pro_visioning 自动PAC配置: - + PAC file PAC文件: - + Inner authentication 内部认证: - + Username 用户名: - + Password 密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - - + + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + Tunneled TLS 隧道 TLS - + Protected EAP (PEAP) 受保护的 EAP - + Anonymous 匿名 - + Authenticated 已认证 - + Both 两者兼用 @@ -375,92 +375,92 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Authentication 认证: - + Username 用户名: - + Password 密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + Tunneled TLS 隧道 TLS - + Protected EAP (PEAP) 受保护的 EAP @@ -473,143 +473,143 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Authentication 认证: - + Anonymous identity 匿名身份: - + Domain 域名: - + CA certificate CA 证书: - + CA certificate password CA 证书密码: - + No CA certificate is required 不需要CA证书 - + PEAP version PEAP版本: - + Inner authentication 内部认证: - + Username 用户名: - + Password 密码: - + Cancel 取消 - + Connect 连接 - - + + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + Tunneled TLS 隧道 TLS - + Protected EAP (PEAP) 受保护的 EAP - + Choose from file 从文件选择... - + Automatic 自动 - + Version 0 版本 0 - + Version 1 版本 1 @@ -622,92 +622,92 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Authentication 认证: - + Username 用户名: - + Password 密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + Tunneled TLS 隧道 TLS - + Protected EAP (PEAP) 受保护的 EAP @@ -720,137 +720,137 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Authentication 认证: - + Identity 身份: - + Domain 域名: - + CA certificate CA 证书: - + CA certificate password CA 证书密码: - + No CA certificate is required 不需要CA证书 - + User certificate 用户证书: - + User certificate password 用户证书密码: - + User private key 用户私钥: - + User key password 用户密钥密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - - - - + + + + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + Tunneled TLS 隧道 TLS - + Protected EAP (PEAP) 受保护的 EAP - - - + + + Choose from file 从文件选择... @@ -863,128 +863,128 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Authentication 认证: - + Anonymous identity 匿名身份: - + Domain 域名: - + CA certificate CA 证书: - + CA certificate password CA 证书密码: - + No CA certificate is required 不需要CA证书 - + Inner authentication 内部认证: - + Username 用户名: - + Password 密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - - + + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + Tunneled TLS 隧道 TLS - + Protected EAP (PEAP) 受保护的 EAP - + Choose from file 从文件选择... @@ -997,97 +997,97 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Key 密钥 - + WEP index WEP 检索 - + Authentication 认证: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 - + 1(default) 1(默认) - + Open System 开放式系统 - + Shared Key 共享密钥 @@ -1100,72 +1100,72 @@ 连接到隐藏 Wi-Fi 网络 - + Add hidden Wi-Fi 加入隐藏Wi-Fi - + Connection 连接设置: - + Network name 网络名称: - + Wi-Fi security Wi-Fi 安全性: - + Password 密码: - + Cancel 取消 - + Connect 连接 - + C_reate… 新建... - + None - + WPA & WPA2 Personal WPA 及 WPA2 个人 - + WEP 40/128-bit Key (Hex or ASCII) WEP 40/128 位密钥(十六进制或ASCII) - + WEP 128-bit Passphrase WEP 128 位密码句 - + Dynamic WEP (802.1X) 动态 WEP (802.1x) - + WPA & WPA2 Enterprise WPA 及 WPA2 企业 @@ -1199,78 +1199,83 @@ 无线网络 - - - - - - + + + + + + Enabled 已开启 - - - - - - - - + + + + + + + + Disabled 已关闭 - - - - - - - + + + + + + + Not connected 当前未连接任何网络 - - - - - - - + + + + + + + Disconnected 未连接 - - - + + + Ethernet Networks 可用网络列表 - - + + Connected 已连接 - - + + Wifi Networks 可用网络列表 - + keep wired network switch is on before turning on wireless switch 打开无线网开关前保持有线网开关打开 - + please insert the wireless network adapter 请先插入无线网卡 + + + Abnormal connection exist, program will delete it + 正在断开异常连接的网络 + update Wi-Fi list now, click again 正在更新 Wi-Fi列表 请再次点击 @@ -1280,17 +1285,17 @@ 正在更新 Wi-Fi列表 - + Conn Ethernet Success 连接有线网络成功 - + Conn Ethernet Fail 连接有线网络失败 - + Conn Wifi Success 连接无线网络成功 diff --git a/wifidetector.h b/wifidetector.h deleted file mode 100644 index c7a79d60..00000000 --- a/wifidetector.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef WIFIDETECTOR_H -#define WIFIDETECTOR_H - -#include - -#endif // WIFIDETECTOR_H