mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-04 21:19:18 -04:00
spelling: attachments
This commit is contained in:
parent
40eafa8adc
commit
569ea3ebdd
1 changed files with 3 additions and 3 deletions
|
@ -449,7 +449,7 @@ void Entry::truncateHistory()
|
||||||
int histMaxSize = db->metadata()->historyMaxSize();
|
int histMaxSize = db->metadata()->historyMaxSize();
|
||||||
if (histMaxSize > -1) {
|
if (histMaxSize > -1) {
|
||||||
int size = 0;
|
int size = 0;
|
||||||
QSet<QByteArray> foundAttachements = attachments()->values().toSet();
|
QSet<QByteArray> foundAttachments = attachments()->values().toSet();
|
||||||
|
|
||||||
QMutableListIterator<Entry*> i(m_history);
|
QMutableListIterator<Entry*> i(m_history);
|
||||||
i.toBack();
|
i.toBack();
|
||||||
|
@ -460,11 +460,11 @@ void Entry::truncateHistory()
|
||||||
if (size <= histMaxSize) {
|
if (size <= histMaxSize) {
|
||||||
size += historyItem->attributes()->attributesSize();
|
size += historyItem->attributes()->attributesSize();
|
||||||
|
|
||||||
const QSet<QByteArray> newAttachments = historyItem->attachments()->values().toSet() - foundAttachements;
|
const QSet<QByteArray> newAttachments = historyItem->attachments()->values().toSet() - foundAttachments;
|
||||||
for (const QByteArray& attachment : newAttachments) {
|
for (const QByteArray& attachment : newAttachments) {
|
||||||
size += attachment.size();
|
size += attachment.size();
|
||||||
}
|
}
|
||||||
foundAttachements += newAttachments;
|
foundAttachments += newAttachments;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size > histMaxSize) {
|
if (size > histMaxSize) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue