Refresh killSwitch state update
This commit is contained in:
parent
13fd957647
commit
7a926f2eef
1 changed files with 4 additions and 4 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue