Skip to content

Commit

Permalink
Update format sources
Browse files Browse the repository at this point in the history
  • Loading branch information
varjolintu committed Dec 4, 2023
1 parent ac2cb7a commit df361e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/format/Kdbx4Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,9 @@ bool Kdbx4Writer::serializeVariantMap(const QVariantMap& map, QByteArray& output
QByteArray dataLenBytes = Endian::sizedIntToBytes(data.size(), KeePass2::BYTEORDER);

CHECK_RETURN_FALSE(buf.write(typeBytes) == 1);
auto res = buf.write(nameLenBytes) == 4;
qDebug() << res;
CHECK_RETURN_FALSE(buf.write(nameLenBytes) == 4);
CHECK_RETURN_FALSE(buf.write(nameLenBytes) == sizeof(qsizetype));
CHECK_RETURN_FALSE(buf.write(nameBytes) == nameBytes.size());
CHECK_RETURN_FALSE(buf.write(dataLenBytes) == 4);
CHECK_RETURN_FALSE(buf.write(dataLenBytes) == sizeof(qsizetype));
CHECK_RETURN_FALSE(buf.write(data) == data.size());
}

Expand Down
2 changes: 1 addition & 1 deletion src/format/KdbxXmlReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ QString KdbxXmlReader::errorString() const
return {};
}

bool KdbxXmlReader::isTrueValue(const QStringView& value)
bool KdbxXmlReader::isTrueValue(QStringView value)
{
return value.compare(QLatin1String("true"), Qt::CaseInsensitive) == 0 || value.toString() == "1";
}
Expand Down
2 changes: 1 addition & 1 deletion src/format/KdbxXmlReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class KdbxXmlReader
virtual Group* getGroup(const QUuid& uuid);
virtual Entry* getEntry(const QUuid& uuid);

virtual bool isTrueValue(const QStringView& value);
virtual bool isTrueValue(QStringView value);
virtual void raiseError(const QString& errorMessage);

const quint32 m_kdbxVersion;
Expand Down

0 comments on commit df361e8

Please sign in to comment.