Implement KDBX 4.1 CustomData modification date

We keep the old merging behaviour for now, since deleting a
CustomData entry does not create DeletedObject.
This commit is contained in:
Janek Bevendorff 2021-11-10 23:11:03 +01:00
parent 390e14b2c6
commit 835e31ac3c
7 changed files with 118 additions and 43 deletions

View file

@ -420,7 +420,7 @@ void KdbxXmlReader::parseCustomDataItem(CustomData* customData)
Q_ASSERT(m_xml.isStartElement() && m_xml.name() == "Item");
QString key;
QString value;
CustomData::CustomDataItem item;
bool keySet = false;
bool valueSet = false;
@ -429,15 +429,17 @@ void KdbxXmlReader::parseCustomDataItem(CustomData* customData)
key = readString();
keySet = true;
} else if (m_xml.name() == "Value") {
value = readString();
item.value = readString();
valueSet = true;
} else if (m_xml.name() == "LastModificationTime") {
item.lastModified = readDateTime();
} else {
skipCurrentElement();
}
}
if (keySet && valueSet) {
customData->set(key, value);
customData->set(key, item);
return;
}