From ff2cd47e7d8f88ae83d3e2aec624bcdd02475338 Mon Sep 17 00:00:00 2001 From: lvhan Date: Fri, 23 Apr 2021 14:52:35 +0800 Subject: [PATCH] =?UTF-8?q?fix=2038986=20=E8=AE=BE=E7=BD=AE=E5=A4=9A?= =?UTF-8?q?=E4=B8=AAip=E4=B9=8B=E5=90=8E=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=EF=BC=9B50095=20=E8=AE=BE=E7=BD=AE=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E5=B8=A6=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kylin-dbus-interface.cpp | 4 ++++ src/mainwindow.cpp | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/kylin-dbus-interface.cpp b/src/kylin-dbus-interface.cpp index 810614d5..e63c1632 100644 --- a/src/kylin-dbus-interface.cpp +++ b/src/kylin-dbus-interface.cpp @@ -347,6 +347,7 @@ void KylinDBus::getLanIpDNS(QString uuidName, bool isActNet) dbusArg2nd.beginArray(); while (!dbusArg2nd.atEnd()) { dbusArg2nd >> m_map;// append map to a vector here if you want to keep it + break; } dbusArg2nd.endArray(); @@ -379,6 +380,7 @@ void KylinDBus::getLanIpDNS(QString uuidName, bool isActNet) dbusArg2nd.beginArray(); while (!dbusArg2nd.atEnd()) { dbusArg2nd >> m_map;// append map to a vector here if you want to keep it + break; } dbusArg2nd.endArray(); @@ -578,6 +580,7 @@ void KylinDBus::getConnectNetIp(QString netUuid) foreach (QVariantMap mDataIpv4, mDatasIpv4) { dbusActiveLanIpv4 = mDataIpv4.value("address").toString(); + break; } //ipv6的路径信息和ip信息 @@ -609,6 +612,7 @@ void KylinDBus::getConnectNetIp(QString netUuid) foreach (QVariantMap mDataIpv6, mDatasIpv6) { dbusActiveLanIpv6 = mDataIpv6.value("address").toString(); + break; } } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f4b3dd26..2e8b9230 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -926,7 +926,7 @@ void MainWindow::getActiveInfoAndSetTrayIcon() // 设置图标 if (actLanName != "--") { QList lanstate = objKyDBus->getAtiveLanSsidUuidState(); - qDebug() << lanstate; + qDebug() << Q_FUNC_INFO << lanstate; if (lanstate[2] == "connected") { setTrayIcon(iconLanOnline); } @@ -1556,7 +1556,8 @@ void MainWindow::getLanListDone(QStringList slist) ifLanConnected = true; objKyDBus->getConnectNetIp(nuuid); - if (mwBandWidth == "Unknown!") { getLanBandWidth(); } +// if (mwBandWidth == "Unknown!") { getLanBandWidth(); } + getLanBandWidth(); //QString strLanName = TranslateLanName(nname); //进行中英文系统环境下有线网络名称的汉化 OneLancForm *ccfAct = new OneLancForm(topLanListWidget, this, confForm, ksnm); @@ -1594,12 +1595,14 @@ void MainWindow::getLanListDone(QStringList slist) \ if (!objKyDBus->dbusLanIpv4.isEmpty()) { if (!objKyDBus->dbusActiveLanIpv4.isEmpty() && objKyDBus->dbusActiveLanIpv4 != objKyDBus->dbusLanIpv4) { +// qDebug() << Q_FUNC_INFO << __LINE__ << objKyDBus->dbusActiveLanIpv4 << objKyDBus->dbusLanIpv4; //在第三方nm-connection-editor进行新的IP配置后,重新连接网络 objKyDBus->reConnectWiredNet(nuuid); } else if ((oldActLanName == actLanSsidName.at(kk)) && (oldDbusActLanDNS != objKyDBus->dbusActLanDNS)) { //在第三方nm-connection-editor进行新的DNS配置后,重新连接网络 objKyDBus->reConnectWiredNet(nuuid); } else if (!objKyDBus->dbusActiveLanIpv6.isEmpty() && objKyDBus->dbusActiveLanIpv6 != objKyDBus->dbusLanIpv6 && objKyDBus->dbusLanIpv6Method == "manual") { +// qDebug() << Q_FUNC_INFO << __LINE__ << objKyDBus->dbusActiveLanIpv6 << objKyDBus->dbusLanIpv6 << objKyDBus->dbusLanIpv6Method; //在第三方nm-connection-editor或kylin-nm配置页进行新的IPV6配置后,重新连接网络 objKyDBus->reConnectWiredNet(nuuid); }