mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-06 05:24:13 -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
|
@ -122,7 +122,7 @@ void FileKey::create(QIODevice* device)
|
|||
xmlWriter.writeStartElement("Key");
|
||||
|
||||
QByteArray data = randomGen()->randomArray(32);
|
||||
xmlWriter.writeTextElement("Data", QString::fromAscii(data.toBase64()));
|
||||
xmlWriter.writeTextElement("Data", QString::fromLatin1(data.toBase64()));
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
|
||||
|
@ -211,7 +211,7 @@ QByteArray FileKey::loadXmlKey(QXmlStreamReader& xmlReader)
|
|||
while (!xmlReader.error() && xmlReader.readNextStartElement()) {
|
||||
if (xmlReader.name() == "Data") {
|
||||
// TODO: do we need to enforce a specific data.size()?
|
||||
data = QByteArray::fromBase64(xmlReader.readElementText().toAscii());
|
||||
data = QByteArray::fromBase64(xmlReader.readElementText().toLatin1());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue