Secure settings 2
This commit is contained in:
parent
870cb26e01
commit
71b57bfed1
7 changed files with 110 additions and 35 deletions
22
client/secure_qsettings.h
Normal file
22
client/secure_qsettings.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue