mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-18 11:08:05 -04:00
Add hasKey() convenience methods.
This commit is contained in:
parent
876a75b572
commit
3ea0592b53
4 changed files with 12 additions and 0 deletions
|
@ -27,6 +27,11 @@ QList<QString> EntryAttachments::keys() const
|
||||||
return m_attachments.keys();
|
return m_attachments.keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EntryAttachments::hasKey(const QString& key) const
|
||||||
|
{
|
||||||
|
return m_attachments.keys().contains(key);
|
||||||
|
}
|
||||||
|
|
||||||
QList<QByteArray> EntryAttachments::values() const
|
QList<QByteArray> EntryAttachments::values() const
|
||||||
{
|
{
|
||||||
return m_attachments.values();
|
return m_attachments.values();
|
||||||
|
|
|
@ -30,6 +30,7 @@ class EntryAttachments : public QObject
|
||||||
public:
|
public:
|
||||||
explicit EntryAttachments(QObject* parent = Q_NULLPTR);
|
explicit EntryAttachments(QObject* parent = Q_NULLPTR);
|
||||||
QList<QString> keys() const;
|
QList<QString> keys() const;
|
||||||
|
bool hasKey(const QString& key) const;
|
||||||
QList<QByteArray> values() const;
|
QList<QByteArray> values() const;
|
||||||
QByteArray value(const QString& key) const;
|
QByteArray value(const QString& key) const;
|
||||||
void set(const QString& key, const QByteArray& value);
|
void set(const QString& key, const QByteArray& value);
|
||||||
|
|
|
@ -36,6 +36,11 @@ QList<QString> EntryAttributes::keys() const
|
||||||
return m_attributes.keys();
|
return m_attributes.keys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool EntryAttributes::hasKey(const QString& key) const
|
||||||
|
{
|
||||||
|
return m_attributes.keys().contains(key);
|
||||||
|
}
|
||||||
|
|
||||||
QList<QString> EntryAttributes::customKeys()
|
QList<QString> EntryAttributes::customKeys()
|
||||||
{
|
{
|
||||||
QList<QString> customKeys;
|
QList<QString> customKeys;
|
||||||
|
|
|
@ -32,6 +32,7 @@ class EntryAttributes : public QObject
|
||||||
public:
|
public:
|
||||||
explicit EntryAttributes(QObject* parent = Q_NULLPTR);
|
explicit EntryAttributes(QObject* parent = Q_NULLPTR);
|
||||||
QList<QString> keys() const;
|
QList<QString> keys() const;
|
||||||
|
bool hasKey(const QString& key) const;
|
||||||
QList<QString> customKeys();
|
QList<QString> customKeys();
|
||||||
QString value(const QString& key) const;
|
QString value(const QString& key) const;
|
||||||
bool isProtected(const QString& key) const;
|
bool isProtected(const QString& key) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue