diff --git a/src/format/Kdbx4Writer.cpp b/src/format/Kdbx4Writer.cpp index 2d19b4b088..3d3a5c1584 100644 --- a/src/format/Kdbx4Writer.cpp +++ b/src/format/Kdbx4Writer.cpp @@ -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()); } diff --git a/src/format/KdbxXmlReader.cpp b/src/format/KdbxXmlReader.cpp index 75c05b8337..dee0d026af 100644 --- a/src/format/KdbxXmlReader.cpp +++ b/src/format/KdbxXmlReader.cpp @@ -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"; } diff --git a/src/format/KdbxXmlReader.h b/src/format/KdbxXmlReader.h index c7aef522c3..30966cd1ba 100644 --- a/src/format/KdbxXmlReader.h +++ b/src/format/KdbxXmlReader.h @@ -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;