Secure settings 2

This commit is contained in:
pokamest 2022-08-05 14:31:12 +03:00
parent 870cb26e01
commit 71b57bfed1
7 changed files with 110 additions and 35 deletions

22
client/secure_qsettings.h Normal file
View file

@ -0,0 +1,22 @@
#ifndef SECUREQSETTINGS_H
#define SECUREQSETTINGS_H
#include <QSettings>
#include <QObject>
class SecureQSettings : public QObject
{
public:
explicit SecureQSettings(const QString &organization, const QString &application = QString(), QObject *parent = nullptr);
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); }
private:
QSettings m_setting;
bool encrypted {false};
};
#endif // SECUREQSETTINGS_H