diff options
Diffstat (limited to 'src/format/KdbxXmlReader.cpp')
-rw-r--r-- | src/format/KdbxXmlReader.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/format/KdbxXmlReader.cpp b/src/format/KdbxXmlReader.cpp index c802040c0..03a87ad5d 100644 --- a/src/format/KdbxXmlReader.cpp +++ b/src/format/KdbxXmlReader.cpp @@ -17,7 +17,7 @@ #include "KdbxXmlReader.h" #include "KeePass2RandomStream.h" -#include "core/DatabaseIcons.h" +#include "core/Clock.h" #include "core/Endian.h" #include "core/Group.h" #include "core/Tools.h" @@ -346,7 +346,7 @@ void KdbxXmlReader::parseIcon() Q_ASSERT(m_xml.isStartElement() && m_xml.name() == "Icon"); QUuid uuid; - QImage icon; + QByteArray iconData; bool uuidSet = false; bool iconSet = false; @@ -355,7 +355,7 @@ void KdbxXmlReader::parseIcon() uuid = readUuid(); uuidSet = !uuid.isNull(); } else if (m_xml.name() == "Data") { - icon.loadFromData(readBinary()); + iconData = readBinary(); iconSet = true; } else { skipCurrentElement(); @@ -367,7 +367,7 @@ void KdbxXmlReader::parseIcon() if (m_meta->hasCustomIcon(uuid)) { uuid = QUuid::createUuid(); } - m_meta->addCustomIcon(uuid, icon); + m_meta->addCustomIcon(uuid, iconData); return; } @@ -509,9 +509,6 @@ Group* KdbxXmlReader::parseGroup() raiseError(tr("Invalid group icon number")); } iconId = 0; - } else if (iconId >= databaseIcons()->count()) { - qWarning("KdbxXmlReader::parseGroup: icon id \"%d\" not supported", iconId); - iconId = databaseIcons()->count() - 1; } group->setIcon(iconId); |