mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
added installation_uuid to apiPayload (#747)
Added installation_uuid to apiPayload
This commit is contained in:
@@ -361,7 +361,9 @@ QString Settings::secondaryDns() const
|
||||
|
||||
void Settings::clearSettings()
|
||||
{
|
||||
auto uuid = getInstallationUuid(false);
|
||||
m_settings.clearSettings();
|
||||
setInstallationUuid(uuid);
|
||||
emit settingsCleared();
|
||||
}
|
||||
|
||||
@@ -423,6 +425,21 @@ void Settings::setAppsSplitTunnelingEnabled(bool enabled)
|
||||
setValue("Conf/appsSplitTunnelingEnabled", enabled);
|
||||
}
|
||||
|
||||
QString Settings::getInstallationUuid(const bool needCreate)
|
||||
{
|
||||
auto uuid = value("Conf/installationUuid", "").toString();
|
||||
if (needCreate && uuid.isEmpty()) {
|
||||
uuid = QUuid::createUuid().toString();
|
||||
setInstallationUuid(uuid);
|
||||
}
|
||||
return uuid;
|
||||
}
|
||||
|
||||
void Settings::setInstallationUuid(const QString &uuid)
|
||||
{
|
||||
setValue("Conf/installationUuid", uuid);
|
||||
}
|
||||
|
||||
ServerCredentials Settings::defaultServerCredentials() const
|
||||
{
|
||||
return serverCredentials(defaultServerIndex());
|
||||
|
||||
Reference in New Issue
Block a user