mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-27 01:56:32 -05:00
Added history limits enforcement
This commit is contained in:
parent
860a2131b3
commit
8c87a87da6
6 changed files with 63 additions and 1 deletions
|
|
@ -32,6 +32,11 @@ QByteArray EntryAttachments::value(const QString& key) const
|
|||
return m_attachments.value(key);
|
||||
}
|
||||
|
||||
int EntryAttachments::dataSize(const QString& key)
|
||||
{
|
||||
return m_attachments.value(key).size();
|
||||
}
|
||||
|
||||
void EntryAttachments::set(const QString& key, const QByteArray& value)
|
||||
{
|
||||
bool emitModified = false;
|
||||
|
|
@ -87,6 +92,15 @@ void EntryAttachments::clear()
|
|||
Q_EMIT modified();
|
||||
}
|
||||
|
||||
int EntryAttachments::attachmentsSize() {
|
||||
int size = 0;
|
||||
|
||||
Q_FOREACH (const QString& key, keys()) {
|
||||
size += dataSize(key);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
bool EntryAttachments::operator==(const EntryAttachments& other) const
|
||||
{
|
||||
return m_attachments == other.m_attachments;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue