fix(有线开关):初始化有线开关时,以后端状态为准,同步gsetting(#175534)
This commit is contained in:
parent
af838bb79f
commit
8b5a300403
|
@ -153,8 +153,7 @@ void LanPage::initNetSwitch()
|
||||||
wiredGsetting = m_switchGsettings->get(WIRED_SWITCH).toBool();
|
wiredGsetting = m_switchGsettings->get(WIRED_SWITCH).toBool();
|
||||||
connect(m_switchGsettings, &QGSettings::changed, this, &LanPage::onSwithGsettingsChanged);
|
connect(m_switchGsettings, &QGSettings::changed, this, &LanPage::onSwithGsettingsChanged);
|
||||||
if (wiredEnable != wiredGsetting) {
|
if (wiredEnable != wiredGsetting) {
|
||||||
wiredEnable = wiredGsetting;
|
m_switchGsettings->set(WIRED_SWITCH, wiredEnable);
|
||||||
m_wiredConnectOperation->setWiredEnabled(wiredGsetting);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue