mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-03 12:06:25 -04:00
Honor protect parameter when overwriting an attribute/attachment.
This commit is contained in:
parent
e397080d79
commit
f39dfa1c88
1 changed files with 6 additions and 0 deletions
|
@ -258,6 +258,9 @@ void Entry::setAttribute(const QString& key, const QString& value, bool protect)
|
||||||
if (protect) {
|
if (protect) {
|
||||||
m_protectedAttributes.insert(key);
|
m_protectedAttributes.insert(key);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
m_protectedAttributes.remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
if (isDefaultAttributue(key)) {
|
if (isDefaultAttributue(key)) {
|
||||||
Q_EMIT dataChanged(this);
|
Q_EMIT dataChanged(this);
|
||||||
|
@ -278,6 +281,9 @@ void Entry::setAttachment(const QString& key, const QByteArray& value, bool prot
|
||||||
if (protect) {
|
if (protect) {
|
||||||
m_protectedAttachments.insert(key);
|
m_protectedAttachments.insert(key);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
m_protectedAttachments.remove(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entry::removeAttachment(const QString& key)
|
void Entry::removeAttachment(const QString& key)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue