mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-20 23:12:34 -05:00
Support editing attribute values in a separate text edit.
This commit is contained in:
parent
3ab81ea776
commit
1d39368f8d
8 changed files with 210 additions and 15 deletions
|
|
@ -110,11 +110,25 @@ void EntryAttributes::rename(const QString& oldKey, const QString& newKey)
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_attributes.contains(newKey)) {
|
||||
Q_ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
QString data = value(oldKey);
|
||||
bool protect = isProtected(oldKey);
|
||||
|
||||
remove(oldKey);
|
||||
set(newKey, data, protect);
|
||||
Q_EMIT aboutToRename(oldKey, newKey);
|
||||
|
||||
m_attributes.remove(oldKey);
|
||||
m_attributes.insert(newKey, data);
|
||||
if (protect) {
|
||||
m_protectedAttributes.remove(oldKey);
|
||||
m_protectedAttributes.insert(newKey);
|
||||
}
|
||||
|
||||
Q_EMIT modified();
|
||||
Q_EMIT renamed(oldKey, newKey);
|
||||
}
|
||||
|
||||
void EntryAttributes::copyCustomKeysFrom(const EntryAttributes* other)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue