Add ability to rename attachments

* Closes #4758
This commit is contained in:
fpohtmeh
2020-07-11 19:12:23 +03:00
committed by Jonathan White
parent e53850627f
commit bbdfbe64da
7 changed files with 64 additions and 0 deletions

View File

@@ -112,6 +112,13 @@ void EntryAttachments::remove(const QStringList& keys)
}
}
void EntryAttachments::rename(const QString& key, const QString& newKey)
{
const QByteArray val = value(key);
remove(key);
set(newKey, val);
}
bool EntryAttachments::isEmpty() const
{
return m_attachments.isEmpty();