Commit 269e5b29 authored by Jan Grulich's avatar Jan Grulich

Do not remove manually configured "route-metric" property from IPv4 and IPv6 setting

BUG:406118
parent 371933b2
......@@ -131,6 +131,11 @@ void IPv4Widget::loadConfig(const NetworkManager::Setting::Ptr &setting)
{
NetworkManager::Ipv4Setting::Ptr ipv4Setting = setting.staticCast<NetworkManager::Ipv4Setting>();
// BUG:406118
// We don't have route-metric in the UI, maybe even won't have for now, but that doesn't mean we
// want to loose it when it's configured manually in a config file
m_tmpIpv4Setting.setRouteMetric(ipv4Setting->routeMetric());
m_tmpIpv4Setting.setRoutes(ipv4Setting->routes());
m_tmpIpv4Setting.setNeverDefault(ipv4Setting->neverDefault());
m_tmpIpv4Setting.setIgnoreAutoRoutes(ipv4Setting->ignoreAutoRoutes());
......@@ -186,6 +191,11 @@ QVariantMap IPv4Widget::setting() const
{
NetworkManager::Ipv4Setting ipv4Setting;
// BUG:406118
// We don't have route-metric in the UI, maybe even won't have for now, but that doesn't mean we
// want to loose it when it's configured manually in a config file
ipv4Setting.setRouteMetric(m_tmpIpv4Setting.routeMetric());
ipv4Setting.setRoutes(m_tmpIpv4Setting.routes());
ipv4Setting.setNeverDefault(m_tmpIpv4Setting.neverDefault());
ipv4Setting.setIgnoreAutoRoutes(m_tmpIpv4Setting.ignoreAutoRoutes());
......
......@@ -120,6 +120,11 @@ void IPv6Widget::loadConfig(const NetworkManager::Setting::Ptr &setting)
{
NetworkManager::Ipv6Setting::Ptr ipv6Setting = setting.staticCast<NetworkManager::Ipv6Setting>();
// BUG:406118
// We don't have route-metric in the UI, maybe even won't have for now, but that doesn't mean we
// want to loose it when it's configured manually in a config file
m_tmpIpv6Setting.setRouteMetric(ipv6Setting->routeMetric());
m_tmpIpv6Setting.setRoutes(ipv6Setting->routes());
m_tmpIpv6Setting.setNeverDefault(ipv6Setting->neverDefault());
m_tmpIpv6Setting.setIgnoreAutoRoutes(ipv6Setting->ignoreAutoRoutes());
......@@ -179,6 +184,11 @@ QVariantMap IPv6Widget::setting() const
{
NetworkManager::Ipv6Setting ipv6Setting;
// BUG:406118
// We don't have route-metric in the UI, maybe even won't have for now, but that doesn't mean we
// want to loose it when it's configured manually in a config file
ipv6Setting.setRouteMetric(m_tmpIpv6Setting.routeMetric());
ipv6Setting.setRoutes(m_tmpIpv6Setting.routes());
ipv6Setting.setNeverDefault(m_tmpIpv6Setting.neverDefault());
ipv6Setting.setIgnoreAutoRoutes(m_tmpIpv6Setting.ignoreAutoRoutes());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment