mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Honor protect parameter when overwriting an attribute/attachment.
This commit is contained in:
parent
e397080d79
commit
f39dfa1c88
@ -258,6 +258,9 @@ void Entry::setAttribute(const QString& key, const QString& value, bool protect)
|
||||
if (protect) {
|
||||
m_protectedAttributes.insert(key);
|
||||
}
|
||||
else {
|
||||
m_protectedAttributes.remove(key);
|
||||
}
|
||||
|
||||
if (isDefaultAttributue(key)) {
|
||||
Q_EMIT dataChanged(this);
|
||||
@ -278,6 +281,9 @@ void Entry::setAttachment(const QString& key, const QByteArray& value, bool prot
|
||||
if (protect) {
|
||||
m_protectedAttachments.insert(key);
|
||||
}
|
||||
else {
|
||||
m_protectedAttachments.remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
void Entry::removeAttachment(const QString& key)
|
||||
|
Loading…
Reference in New Issue
Block a user