Backup/restore config
This commit is contained in:
parent
71b57bfed1
commit
1e85b25438
12 changed files with 155 additions and 105 deletions
|
@ -11,12 +11,19 @@ public:
|
|||
|
||||
QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
|
||||
void setValue(const QString &key, const QVariant &value);
|
||||
void sync() { m_setting.sync(); }
|
||||
void remove(const QString &key) { m_setting.remove(key); }
|
||||
void remove(const QString &key);
|
||||
void sync();
|
||||
|
||||
QByteArray backupAppConfig() const;
|
||||
void restoreAppConfig(const QByteArray &base64Cfg);
|
||||
|
||||
private:
|
||||
QSettings m_setting;
|
||||
bool encrypted {false};
|
||||
|
||||
mutable QMap<QString, QVariant> m_cache;
|
||||
|
||||
QStringList encryptedKeys; // encode only key listed here
|
||||
};
|
||||
|
||||
#endif // SECUREQSETTINGS_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue