From eae440d3a7ef237889799c8eb472d8ef2f9b66fa Mon Sep 17 00:00:00 2001 From: huanchuang <260832833@qq.com> Date: Fri, 28 May 2021 09:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0VPN=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backthread.cpp | 9 +++++++-- src/mainwindow.cpp | 7 +++++++ translations/kylin-nm_bo.ts | 5 +++++ translations/kylin-nm_tr.ts | 5 +++++ translations/kylin-nm_zh_CN.qm | Bin 23718 -> 23797 bytes translations/kylin-nm_zh_CN.ts | 5 +++++ 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/backthread.cpp b/src/backthread.cpp index a418242a..b5b27d79 100644 --- a/src/backthread.cpp +++ b/src/backthread.cpp @@ -212,7 +212,7 @@ void BackThread::execConnLan(QString connName, QString ifname, QString connectTy bool isWiredCableAlready = objBackThreadDBus.getWiredCableStateByIfname(ifname); - if (connectType == "bluetooth" || ifname == "") { + if (connectType == "bluetooth" || connectType == "vpn"|| ifname == "") { isWiredCableAlready = true; //对于蓝牙类型的网络不需要接入网线就可以连接 mycmd = "export LANG='en_US.UTF-8';export LANGUAGE='en_US';nmcli connection up '" + connName + "'"; } else { @@ -275,7 +275,12 @@ void BackThread::dellConnectLanResult(QString info) } else if(info.indexOf("Carrier/link changed") != -1) { emit connDone(8); } else { - emit connDone(9); + if (currConnLanType == "vpn"){ + emit connDone(10); + } + else{ + emit connDone(9); + } } } } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 18d16118..eb4df2d4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4003,6 +4003,13 @@ void MainWindow::connLanDone(int connFlag) objKyDBus->showDesktopNotify(txt); } + if (connFlag == 10) { + qDebug()<<"Connect VPN Network Failed"; + is_connect_net_failed = 1; + QString txt(tr("Connect VPN Network Failed")); + objKyDBus->showDesktopNotify(txt); + } + this->stopLoading(); this->is_stop_check_net_state = 0; } diff --git a/translations/kylin-nm_bo.ts b/translations/kylin-nm_bo.ts index 9da96707..dc22cba0 100644 --- a/translations/kylin-nm_bo.ts +++ b/translations/kylin-nm_bo.ts @@ -1362,6 +1362,11 @@ Connect Wired Network Failed + + + Connect VPN Network Failed + + IP configuration could not be reserved diff --git a/translations/kylin-nm_tr.ts b/translations/kylin-nm_tr.ts index 8d0d89c9..1e012c0f 100644 --- a/translations/kylin-nm_tr.ts +++ b/translations/kylin-nm_tr.ts @@ -1521,6 +1521,11 @@ Connect Wired Network Failed + + + Connect VPN Network Failed + + IP configuration could not be reserved diff --git a/translations/kylin-nm_zh_CN.qm b/translations/kylin-nm_zh_CN.qm index 5f3b238bd2702b7559fda1b481966afd04eb9b9a..2334eb52882e2b789a3fad6e6468d4d91270a8d7 100644 GIT binary patch delta 880 zcmXAnX-HI27>3_FcX8%konb69C7Cj{G!3_LX>o1TJLAxoHM=LcrSNkx?chy zmH|Sm#wF`D=9tLC-Am0n({%#;^U)!L?T#HDb zCLp^I>fV#Y#w!pcEcL2*yup!RZ z(5#EN(?x%)*%%iRotvSnF_Wgar@ER?6V$X(H#|B{=U?CrH(fw_5Fh$>E0A=MkDWzB zQhzawKm2kMP>^5=dSnOiT*~>@UO_3#QKIHQG0b31y7{ z?-a9x>&VZ9m~+$|DLCef{au|v%7`RA=mV@B(!Bd*FfW}o3G3vH zNNFUR#Mn=;G2w@IzE$u3sZ!N*gEj0cIT~eSVkTG0tdfQ6XGK!{oPF}l=BfOACn>r*Q3#Q-xlDQnN$fWlIxDex_Myshl%7^EA2!iGEwe2+)b zq~xng=hRyGA>~qgDDAmegx+H4_H?9?%H+SSNI#Fe$C~sZa)IO(aE9JxS_bRU`*JQe zsJ|STv&g6l7bxE=#)ifI6bNT*D4SxOao}J*zN~2nW^%Mvs`ux+YH*a=TY@1!2?_e$JT=%4U&ig-oGWnkX delta 824 zcmXAlYe-XJ7{{Npoin#{+=k0L>1gQ0nX%M)!BW%K+{JmpOL&9j9Wq4`$+UtpO0%># z#Y#Vvw~}r!Eey4b7ot$2pvVd`^@HRT3P02&d*pojo%iLu&-45LH^->KF{<6&M+?B@ z0nk@@9w_H&e%%r3<#rwDk8J?PYrrJy08+a_2h@Y@*e=gl^9LJPW zo++dBlc;|H-t{~K!g_K2RvcC^q?ubOQ69BqyQP4C7v~H0mx|G$g zidMr=#*|4M^tvK-U2NYl;$QD1I?XbGetz>S)!;t39R=e>@R7aRZs4; z{)e?WBhagqr?Hqk5asy9vL$AGZ;at-tzzp)4Ay5MelBH3Ej#xz0YD&R*V<`xtL5Cb zZUR`sx$uY^&_F8(no5C>7GNV8b2N_#H#8;nMYZK-la KZ%;AZRs09a2JG|z diff --git a/translations/kylin-nm_zh_CN.ts b/translations/kylin-nm_zh_CN.ts index d9729e56..ae09e41e 100644 --- a/translations/kylin-nm_zh_CN.ts +++ b/translations/kylin-nm_zh_CN.ts @@ -1517,6 +1517,11 @@ Connect Wired Network Failed 连接有线网络失败 + + + Connect VPN Network Failed + 连接VPN失败 + IP configuration could not be reserved