mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-02 17:20:30 -05:00
Add menu entry to copy an entry attribute to clipboard.
This commit is contained in:
parent
18337927f5
commit
ddd5e8a209
7 changed files with 71 additions and 3 deletions
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
#include "EntryAttributes.h"
|
||||
|
||||
const QStringList EntryAttributes::DefaultAttributes(QStringList() << "Title" << "URL"
|
||||
<< "UserName" << "Password" << "Notes");
|
||||
const QStringList EntryAttributes::DefaultAttributes(QStringList() << "Title" << "UserName"
|
||||
<< "Password" << "URL" << "Notes");
|
||||
|
||||
EntryAttributes::EntryAttributes(QObject* parent)
|
||||
: QObject(parent)
|
||||
|
|
@ -31,6 +31,17 @@ QList<QString> EntryAttributes::keys() const
|
|||
return m_attributes.keys();
|
||||
}
|
||||
|
||||
QList<QString> EntryAttributes::customKeys()
|
||||
{
|
||||
QList<QString> customKeys;
|
||||
Q_FOREACH (const QString& key, keys()) {
|
||||
if (!isDefaultAttribute(key)) {
|
||||
customKeys.append(key);
|
||||
}
|
||||
}
|
||||
return customKeys;
|
||||
}
|
||||
|
||||
QString EntryAttributes::value(const QString& key) const
|
||||
{
|
||||
return m_attributes.value(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue