mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-21 04:28:26 -04:00
Use QString::toLatin1() rather than ::toAscii()
The toAscii (and fromAscii) are removed from Qt5 in favor of Latin1.
This commit is contained in:
parent
03e4b2d13c
commit
66b3d22041
7 changed files with 16 additions and 16 deletions
|
@ -779,7 +779,7 @@ void KeePass2XmlReader::parseEntryString(Entry* entry)
|
|||
|
||||
if (isProtected && !value.isEmpty()) {
|
||||
if (m_randomStream) {
|
||||
value = QString::fromUtf8(m_randomStream->process(QByteArray::fromBase64(value.toAscii())));
|
||||
value = QString::fromUtf8(m_randomStream->process(QByteArray::fromBase64(value.toLatin1())));
|
||||
}
|
||||
else {
|
||||
raiseError("Unable to decrypt entry string");
|
||||
|
@ -1053,7 +1053,7 @@ Uuid KeePass2XmlReader::readUuid()
|
|||
|
||||
QByteArray KeePass2XmlReader::readBinary()
|
||||
{
|
||||
return QByteArray::fromBase64(readString().toAscii());
|
||||
return QByteArray::fromBase64(readString().toLatin1());
|
||||
}
|
||||
|
||||
QByteArray KeePass2XmlReader::readCompressedBinary()
|
||||
|
|
|
@ -192,7 +192,7 @@ void KeePass2XmlWriter::writeBinaries()
|
|||
}
|
||||
|
||||
if (!data.isEmpty()) {
|
||||
m_xml.writeCharacters(QString::fromAscii(data.toBase64()));
|
||||
m_xml.writeCharacters(QString::fromLatin1(data.toBase64()));
|
||||
}
|
||||
m_xml.writeEndElement();
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ void KeePass2XmlWriter::writeEntry(const Entry* entry)
|
|||
if (m_randomStream) {
|
||||
m_xml.writeAttribute("Protected", "True");
|
||||
QByteArray rawData = m_randomStream->process(entry->attributes()->value(key).toUtf8());
|
||||
value = QString::fromAscii(rawData.toBase64());
|
||||
value = QString::fromLatin1(rawData.toBase64());
|
||||
}
|
||||
else {
|
||||
m_xml.writeAttribute("ProtectInMemory", "True");
|
||||
|
@ -485,7 +485,7 @@ void KeePass2XmlWriter::writeUuid(const QString& qualifiedName, const Entry* ent
|
|||
|
||||
void KeePass2XmlWriter::writeBinary(const QString& qualifiedName, const QByteArray& ba)
|
||||
{
|
||||
writeString(qualifiedName, QString::fromAscii(ba.toBase64()));
|
||||
writeString(qualifiedName, QString::fromLatin1(ba.toBase64()));
|
||||
}
|
||||
|
||||
void KeePass2XmlWriter::writeColor(const QString& qualifiedName, const QColor& color)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue