mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Add tests for modified, fix history for autotype
Added tests to ensure #1387 works Fixed issue detected during testing - AutoTypeAssociations were not pushed to history
This commit is contained in:
committed by
Janek Bevendorff
parent
045f157a63
commit
943dc6cdd6
@@ -156,9 +156,13 @@ bool EntryAttachments::operator!=(const EntryAttachments& other) const
|
||||
int EntryAttachments::attachmentsSize(const QSet<QByteArray> &ignoredAttachments) const
|
||||
{
|
||||
int size = 0;
|
||||
const QSet<QByteArray> consideredAttachments = m_attachments.values().toSet() - ignoredAttachments;
|
||||
for (const QByteArray& attachment : consideredAttachments) {
|
||||
size += attachment.size();
|
||||
|
||||
QMapIterator<QString, QByteArray> i(m_attachments);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if( ! ignoredAttachments.contains( i.value() )){
|
||||
size += i.key().toUtf8().size() + i.value().size();
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user