Filter settings fields to backup
This commit is contained in:
parent
24759c92ad
commit
9faabe9e7d
2 changed files with 24 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue