Refresh killSwitch state update

This commit is contained in:
Mykola Baibuz 2025-02-19 15:54:21 +02:00
parent 13fd957647
commit 7a926f2eef

View file

@ -54,19 +54,19 @@ bool KillSwitch::init()
bool KillSwitch::refresh(bool enabled) bool KillSwitch::refresh(bool enabled)
{ {
#ifdef Q_OS_WIN #if defined(Q_OS_WIN)
QSettings RegHLM("HKEY_LOCAL_MACHINE\\Software\\" + QString(ORGANIZATION_NAME) QSettings RegHLM("HKEY_LOCAL_MACHINE\\Software\\" + QString(ORGANIZATION_NAME)
+ "\\" + QString(APPLICATION_NAME), QSettings::NativeFormat); + "\\" + QString(APPLICATION_NAME), QSettings::NativeFormat);
RegHLM.setValue("strictKillSwitchEnabled", enabled); RegHLM.setValue("strictKillSwitchEnabled", enabled);
#endif #elif
m_appSettigns->setValue("Conf/strictKillSwitchEnabled", enabled); m_appSettigns->setValue("Conf/strictKillSwitchEnabled", enabled);
#endif
if (isStrictKillSwitchEnabled()) { if (isStrictKillSwitchEnabled()) {
return disableAllTraffic(); return disableAllTraffic();
} else { } else {
return disableKillSwitch(); return disableKillSwitch();
} }
} }
bool KillSwitch::isStrictKillSwitchEnabled() bool KillSwitch::isStrictKillSwitchEnabled()