mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Removing QWidget dependency from src/core.
This commit is contained in:
@@ -162,19 +162,12 @@ void KdbxXmlWriter::writeCustomIcons()
|
||||
m_xml.writeEndElement();
|
||||
}
|
||||
|
||||
void KdbxXmlWriter::writeIcon(const QUuid& uuid, const QImage& icon)
|
||||
void KdbxXmlWriter::writeIcon(const QUuid& uuid, const QByteArray& iconData)
|
||||
{
|
||||
m_xml.writeStartElement("Icon");
|
||||
|
||||
writeUuid("UUID", uuid);
|
||||
|
||||
QByteArray ba;
|
||||
QBuffer buffer(&ba);
|
||||
buffer.open(QIODevice::WriteOnly);
|
||||
// TODO: check !icon.save()
|
||||
icon.save(&buffer, "PNG");
|
||||
buffer.close();
|
||||
writeBinary("Data", ba);
|
||||
writeBinary("Data", iconData);
|
||||
|
||||
m_xml.writeEndElement();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user