mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-20 03:58:10 -04:00
Formatting the code.
This commit is contained in:
parent
74efc57369
commit
8324d03f0a
294 changed files with 3796 additions and 3740 deletions
|
@ -17,16 +17,16 @@
|
|||
|
||||
#include "KdbxXmlReader.h"
|
||||
#include "KeePass2RandomStream.h"
|
||||
#include "core/Global.h"
|
||||
#include "core/Tools.h"
|
||||
#include "core/Entry.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/DatabaseIcons.h"
|
||||
#include "core/Endian.h"
|
||||
#include "core/Entry.h"
|
||||
#include "core/Global.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/Tools.h"
|
||||
#include "streams/QtIOCompressor"
|
||||
|
||||
#include <QFile>
|
||||
#include <QBuffer>
|
||||
#include <QFile>
|
||||
|
||||
/**
|
||||
* @param version KDBX version
|
||||
|
@ -114,13 +114,11 @@ void KdbxXmlReader::readDatabase(QIODevice* device, Database* db, KeePass2Random
|
|||
}
|
||||
|
||||
if (!m_tmpParent->children().isEmpty()) {
|
||||
qWarning("KdbxXmlReader::readDatabase: found %d invalid group reference(s)",
|
||||
m_tmpParent->children().size());
|
||||
qWarning("KdbxXmlReader::readDatabase: found %d invalid group reference(s)", m_tmpParent->children().size());
|
||||
}
|
||||
|
||||
if (!m_tmpParent->entries().isEmpty()) {
|
||||
qWarning("KdbxXmlReader::readDatabase: found %d invalid entry reference(s)",
|
||||
m_tmpParent->children().size());
|
||||
qWarning("KdbxXmlReader::readDatabase: found %d invalid entry reference(s)", m_tmpParent->children().size());
|
||||
}
|
||||
|
||||
const QSet<QString> poolKeys = m_binaryPool.keys().toSet();
|
||||
|
@ -136,7 +134,7 @@ void KdbxXmlReader::readDatabase(QIODevice* device, Database* db, KeePass2Random
|
|||
qWarning("KdbxXmlReader::readDatabase: found unused key \"%s\"", qPrintable(key));
|
||||
}
|
||||
|
||||
QHash<QString, QPair<Entry*, QString> >::const_iterator i;
|
||||
QHash<QString, QPair<Entry*, QString>>::const_iterator i;
|
||||
for (i = m_binaryMap.constBegin(); i != m_binaryMap.constEnd(); ++i) {
|
||||
const QPair<Entry*, QString>& target = i.value();
|
||||
target.first->attachments()->set(target.second, m_binaryPool[i.key()]);
|
||||
|
@ -191,8 +189,7 @@ QString KdbxXmlReader::errorString() const
|
|||
|
||||
bool KdbxXmlReader::isTrueValue(const QStringRef& value)
|
||||
{
|
||||
return value.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0
|
||||
|| value == "1";
|
||||
return value.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0 || value == "1";
|
||||
}
|
||||
|
||||
void KdbxXmlReader::raiseError(const QString& errorMessage)
|
||||
|
@ -386,12 +383,10 @@ void KdbxXmlReader::parseBinaries()
|
|||
|
||||
QXmlStreamAttributes attr = m_xml.attributes();
|
||||
QString id = attr.value("ID").toString();
|
||||
QByteArray data = isTrueValue(attr.value("Compressed"))
|
||||
? readCompressedBinary() : readBinary();
|
||||
QByteArray data = isTrueValue(attr.value("Compressed")) ? readCompressedBinary() : readBinary();
|
||||
|
||||
if (m_binaryPool.contains(id)) {
|
||||
qWarning("KdbxXmlReader::parseBinaries: overwriting binary item \"%s\"",
|
||||
qPrintable(id));
|
||||
qWarning("KdbxXmlReader::parseBinaries: overwriting binary item \"%s\"", qPrintable(id));
|
||||
}
|
||||
|
||||
m_binaryPool.insert(id, data);
|
||||
|
@ -1192,4 +1187,3 @@ void KdbxXmlReader::skipCurrentElement()
|
|||
qWarning("KdbxXmlReader::skipCurrentElement: skip element \"%s\"", qPrintable(m_xml.name().toString()));
|
||||
m_xml.skipCurrentElement();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue