added installation_uuid to apiPayload (#747)
Added installation_uuid to apiPayload
This commit is contained in:
parent
f0085f52eb
commit
d50e7dd3f4
8 changed files with 38 additions and 10 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue