mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-20 03:58:10 -04:00
Implement KDBX 4.1 extended custom icons
This commit is contained in:
parent
70e62d90db
commit
390e14b2c6
17 changed files with 137 additions and 48 deletions
|
@ -347,6 +347,8 @@ void KdbxXmlReader::parseIcon()
|
|||
|
||||
QUuid uuid;
|
||||
QByteArray iconData;
|
||||
QString name;
|
||||
QDateTime lastModified;
|
||||
bool uuidSet = false;
|
||||
bool iconSet = false;
|
||||
|
||||
|
@ -357,6 +359,10 @@ void KdbxXmlReader::parseIcon()
|
|||
} else if (m_xml.name() == "Data") {
|
||||
iconData = readBinary();
|
||||
iconSet = true;
|
||||
} else if (m_xml.name() == "Name") {
|
||||
name = readString();
|
||||
} else if (m_xml.name() == "LastModificationTime") {
|
||||
lastModified = readDateTime();
|
||||
} else {
|
||||
skipCurrentElement();
|
||||
}
|
||||
|
@ -367,7 +373,7 @@ void KdbxXmlReader::parseIcon()
|
|||
if (m_meta->hasCustomIcon(uuid)) {
|
||||
uuid = QUuid::createUuid();
|
||||
}
|
||||
m_meta->addCustomIcon(uuid, iconData);
|
||||
m_meta->addCustomIcon(uuid, iconData, name, lastModified);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue