mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-20 03:58:10 -04:00
Removing QWidget dependency from src/core.
This commit is contained in:
parent
6f5bbf7ad1
commit
004f2b6801
46 changed files with 298 additions and 313 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue