Fix bug change if of connected wired network do not effect
This commit is contained in:
parent
7d1aeee17b
commit
55db6aecab
|
@ -85,7 +85,6 @@ IFace* BackThread::execGetIface()
|
|||
// if type is wired network
|
||||
iface->lname = iname;
|
||||
|
||||
qDebug() << "有线网的状态是 "<<istateStr;
|
||||
if (istateStr == "unmanaged") {
|
||||
iface->lstate = 2; //switch of wired device is off
|
||||
} else if (istateStr == "disconnected" || istateStr == "unavailable") {
|
||||
|
|
|
@ -344,9 +344,8 @@ void KylinDBus::getLanIpDNS(QString uuidName, bool isActNet)
|
|||
dbusArg2nd.beginArray();
|
||||
while (!dbusArg2nd.atEnd()) {
|
||||
dbusArg2nd >> strDns;// append map to a vector here if you want to keep it
|
||||
// 当获取到dns时,dns肯定不会为0,所以就会有一个类似出栈的操作,就会走到atEnd尾部;
|
||||
// 当获取到的dns为空时,就没有类似的出栈操作,获取到的数字就有问题;
|
||||
if (strDns == 0) {
|
||||
//dbusArg2nd为空时,strDns没有从dbusArg2nd获取到结果
|
||||
dbusArg2nd.endArray();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1482,11 +1482,11 @@ void MainWindow::getLanListDone(QStringList slist)
|
|||
} else {
|
||||
ccfAct->setLine(false); //最后一个item不显示下划线
|
||||
}
|
||||
|
||||
if (!objKyDBus->dbusLanIpv4.isEmpty()) {
|
||||
\
|
||||
if (!objKyDBus->dbusLanIpv4.isEmpty() && !objKyDBus->dbusActiveLanIpv4.isEmpty()) {
|
||||
if (objKyDBus->dbusActiveLanIpv4 != objKyDBus->dbusLanIpv4) {
|
||||
//在第三方nm-connection-editor进行新的IP配置后,重新连接网络
|
||||
//objKyDBus->connectWiredNet(nname);
|
||||
objKyDBus->connectWiredNet(nname);
|
||||
} else if ((oldActLanName == actLanSsidName.at(kk)) && (oldDbusActLanDNS != objKyDBus->dbusActLanDNS)) {
|
||||
//在第三方nm-connection-editor进行新的DNS配置后,重新连接网络
|
||||
objKyDBus->connectWiredNet(nname);
|
||||
|
|
Loading…
Reference in New Issue