Properly save custom header data

Ensure adding custom data upgrades to KDBX4
Implement review feedback
This commit is contained in:
Janek Bevendorff 2018-02-18 21:01:22 +01:00
parent 114f00e1e8
commit 5410d78bbb
26 changed files with 189 additions and 174 deletions

View file

@ -342,12 +342,12 @@ const EntryAttachments* Entry::attachments() const
return m_attachments;
}
CustomData *Entry::customData()
CustomData* Entry::customData()
{
return m_customData;
}
const CustomData *Entry::customData() const
const CustomData* Entry::customData() const
{
return m_customData;
}
@ -618,7 +618,7 @@ void Entry::truncateHistory()
size += historyItem->attributes()->attributesSize();
size += historyItem->autoTypeAssociations()->associationsSize();
size += historyItem->attachments()->attachmentsSize();
size += customData()->dataSize();
size += historyItem->customData()->dataSize();
const QStringList tags = historyItem->tags().split(delimiter, QString::SkipEmptyParts);
for (const QString& tag : tags) {
size += tag.toUtf8().size();