26#include "GlobalObject.h"
77 [[nodiscard]]
auto empty() const ->
bool
99 [[nodiscard]] Q_INVOKABLE
bool contains(
const QString& key)
const
101 return m_passwordDB.contains(key);
111 [[nodiscard]] Q_INVOKABLE QString
password(
const QString& key)
const
113 return m_passwordDB.value(key);
155 QString passwordDBFileName;
157 QHash<QString, QString> m_passwordDB;
static Q_INVOKABLE Traffic::PasswordDB * passwordDB()
Pointer to appplication-wide static PasswordDB instance.
Q_INVOKABLE void removePassword(const QString &key)
Remove key/password.
void emptyChanged()
Notifier signal.
PasswordDB(QObject *parent=nullptr)
Default constructor.
Q_INVOKABLE void setPassword(const QString &key, const QString &password)
Set key/password.
auto empty() const -> bool
Getter method for property with the same name.
Q_INVOKABLE QString password(const QString &key) const
Find password for a given key.
Q_INVOKABLE void clear()
Clear database.
Q_INVOKABLE bool contains(const QString &key) const
Check if database contains a given key.