Merge pull request #119 from myshowtogo/master

fix 38986 设置多个ip之后显示异常;50095 设置网络带宽
This commit is contained in:
chenlelin 2021-04-25 19:47:49 +08:00 committed by GitHub
commit 07c7a52605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -363,7 +363,7 @@ void MainWindow::createLeftAreaUI()
ui->btnNetListImg->setProperty("iconHighlightEffectMode", true);
ui->btnWifiList->setFocusPolicy(Qt::NoFocus);
QString txtWifi(tr("Wifi"));
QString txtWifi("Wifi");
ui->btnWifiList->setToolTip(txtWifi);
ui->lbWifiListBG->setStyleSheet(btnOffQss);
//设置PushButton背景透明
@ -933,7 +933,7 @@ void MainWindow::getActiveInfoAndSetTrayIcon()
// 设置图标
if (actLanName != "--") {
QList<QString> lanstate = objKyDBus->getAtiveLanSsidUuidState();
qDebug() << lanstate;
qDebug() << Q_FUNC_INFO << lanstate;
if (lanstate[2] == "connected") {
setTrayIcon(iconLanOnline);
}
@ -1333,7 +1333,7 @@ void MainWindow::on_btnWifiList_clicked()
lbNoItemTip->hide();
ui->lbNetwork->setText(tr("Wifi"));
ui->lbNetwork->setText("Wifi");
btnWireless->show();
if (iface->wstate == 0 || iface->wstate == 1) {
@ -1565,7 +1565,7 @@ void MainWindow::getLanListDone(QStringList slist)
objKyDBus->getConnectNetIp(nuuid);
confForm->actLanIpv6Addr = objKyDBus->dbusActiveLanIpv6;
if (mwBandWidth == "Unknown!") { getLanBandWidth(); }
getLanBandWidth();
//QString strLanName = TranslateLanName(nname); //进行中英文系统环境下有线网络名称的汉化
OneLancForm *ccfAct = new OneLancForm(topLanListWidget, this, confForm, ksnm);
@ -1603,12 +1603,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);
}