Merge branch 'dbus-interface-zb113996' into 'dbus-interface'

Fixed Bug#113996 连接WIFI后手动配置IPV6地址网络设置详情页地址不变

See merge request kylin-desktop/kylin-nm!571
This commit is contained in:
赵 世旭 2022-04-18 01:50:39 +00:00
commit 692a6348b0
1 changed files with 21 additions and 0 deletions

View File

@ -103,6 +103,27 @@ void KyWiredConnectOperation::updateWiredConnect(const QString &connectUuid, con
mapmap1["ipv4"] = map1;
}
if (mapmap1.contains("ipv6")) {
QVariantMap map2 = mapmap1.value(QLatin1String("ipv6"));
bool isAuto = false;
if (map2.contains("method") && map2["method"] == "auto") {
qDebug() << "[KyWiredConnectOperation] set ipv6 method auto, clear address-data && addresses && gateway";
isAuto = true;
}
if (isAuto) {
if (map2.contains("address-data")) {
map2.remove("address-data");
}
if (map2.contains("addresses")) {
map2.remove("addresses");
}
if (map2.contains("gateway")) {
map2.remove("gateway");
}
}
mapmap1["ipv6"] = map2;
}
connectPtr->update(mapmap1);
return ;