mirror of
https://github.com/outbackdingo/amnezia-client.git
synced 2026-01-27 10:18:14 +00:00
Filter settings fields to backup
This commit is contained in:
@@ -124,8 +124,27 @@ QByteArray SecureQSettings::backupAppConfig() const
|
||||
{
|
||||
QJsonObject cfg;
|
||||
|
||||
const auto needToBackup = [this](const auto &key) {
|
||||
for (const auto &item : m_fieldsToBackup)
|
||||
{
|
||||
if (key == "Conf/installationUuid")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key.startsWith(item))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
for (const QString &key : m_settings.allKeys()) {
|
||||
if (key == "Conf/installationUuid") {
|
||||
|
||||
if (!needToBackup(key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user