Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/KdbxXmlWriter.cpp')
-rw-r--r--src/format/KdbxXmlWriter.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/format/KdbxXmlWriter.cpp b/src/format/KdbxXmlWriter.cpp
index 853a64e89..c71aa42b9 100644
--- a/src/format/KdbxXmlWriter.cpp
+++ b/src/format/KdbxXmlWriter.cpp
@@ -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();
}