#pragma once #include #include #include namespace Keychain { constexpr char url[]{"keychain.emailQt.kvuj.app"}; const QString passKey("Password"); } class KeychainClass : public QObject { Q_OBJECT public: explicit KeychainClass(QObject *parent = nullptr); void readKey(const QString &key); void writeKey(const QString &key, const QString &value); void deleteKey(const QString &key); signals: void keyRead(const QString &key, const QString &value); private: QKeychain::ReadPasswordJob readCredentialJob; QKeychain::WritePasswordJob writeCredentialJob; QKeychain::DeletePasswordJob deleteCredentialJob; };