mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
update: changed logic, added to settingsController
This commit is contained in:
@@ -192,6 +192,36 @@ void SettingsController::clearSettings()
|
||||
toggleAutoStart(false);
|
||||
}
|
||||
|
||||
bool SettingsController::isFileEncryptionEnabled()
|
||||
{
|
||||
return m_appSettingsRepository->isFileEncryption();
|
||||
}
|
||||
|
||||
void SettingsController::toggleFileEncryption(bool enable)
|
||||
{
|
||||
m_appSettingsRepository->setFileEncryption(enable);
|
||||
}
|
||||
|
||||
void SettingsController::setPassword(QString pwd)
|
||||
{
|
||||
m_appSettingsRepository->setPassword(pwd);
|
||||
}
|
||||
|
||||
QString SettingsController::getPassword()
|
||||
{
|
||||
return m_appSettingsRepository->getPassword();
|
||||
}
|
||||
|
||||
void SettingsController::setHint(QString hint)
|
||||
{
|
||||
m_appSettingsRepository->setHint(hint);
|
||||
}
|
||||
|
||||
QString SettingsController::getHint()
|
||||
{
|
||||
return m_appSettingsRepository->getHint();
|
||||
}
|
||||
|
||||
bool SettingsController::isAutoConnectEnabled() const
|
||||
{
|
||||
return m_appSettingsRepository->isAutoConnect();
|
||||
|
||||
@@ -44,6 +44,15 @@ public:
|
||||
|
||||
void clearSettings();
|
||||
|
||||
bool isFileEncryptionEnabled();
|
||||
void toggleFileEncryption(bool enable);
|
||||
|
||||
void setPassword(QString pwd);
|
||||
QString getPassword();
|
||||
|
||||
void setHint(QString hint);
|
||||
QString getHint();
|
||||
|
||||
bool isAutoConnectEnabled() const;
|
||||
void toggleAutoConnect(bool enable);
|
||||
|
||||
|
||||
@@ -300,6 +300,33 @@ void SecureAppSettingsRepository::setStrictKillSwitchEnabled(bool enabled)
|
||||
setValue("Conf/strictKillSwitchEnabled", enabled);
|
||||
}
|
||||
|
||||
bool SecureAppSettingsRepository::isFileEncryption() const
|
||||
{
|
||||
return value("Sec/fileEncryption", false).toBool();
|
||||
}
|
||||
void SecureAppSettingsRepository::setFileEncryption(bool enabled)
|
||||
{
|
||||
setValue("Sec/fileEncryption", enabled);
|
||||
}
|
||||
|
||||
QString SecureAppSettingsRepository::getPassword() const
|
||||
{
|
||||
return m_settings->getPassword();
|
||||
}
|
||||
void SecureAppSettingsRepository::setPassword(const QString &pwd)
|
||||
{
|
||||
m_settings->setPassword(pwd);
|
||||
}
|
||||
|
||||
QString SecureAppSettingsRepository::getHint() const
|
||||
{
|
||||
return m_settings->getHint();
|
||||
}
|
||||
void SecureAppSettingsRepository::setHint(const QString &hint)
|
||||
{
|
||||
m_settings->setHint(hint);
|
||||
}
|
||||
|
||||
bool SecureAppSettingsRepository::isAutoConnect() const
|
||||
{
|
||||
return value("Conf/autoConnect", false).toBool();
|
||||
|
||||
@@ -64,6 +64,13 @@ public:
|
||||
void setKillSwitchEnabled(bool enabled);
|
||||
bool isStrictKillSwitchEnabled() const;
|
||||
void setStrictKillSwitchEnabled(bool enabled);
|
||||
|
||||
bool isFileEncryption() const;
|
||||
void setFileEncryption(bool enabled);
|
||||
QString getPassword() const;
|
||||
void setPassword(const QString &pwd);
|
||||
QString getHint() const;
|
||||
void setHint(const QString &hint);
|
||||
|
||||
bool isAutoConnect() const;
|
||||
void setAutoConnect(bool enabled);
|
||||
|
||||
Reference in New Issue
Block a user