Use QString::toLatin instead of deprecated toAscii
This commit is contained in:
parent
74382f09d2
commit
9a9333035a
2 changed files with 5 additions and 5 deletions
|
@ -100,9 +100,9 @@ Daemon::Daemon(QObject *parent)
|
|||
//http://delta.affinix.com/docs/qca/rsatest_8cpp-example.html
|
||||
if (config->group("myself").hasKey("privateKey")) {
|
||||
//Migration from older versions of KDE Connect
|
||||
privKey.write(config->group("myself").readEntry<QString>("privateKey",QCA::KeyGenerator().createRSA(2048).toPEM()).toAscii());
|
||||
privKey.write(config->group("myself").readEntry<QString>("privateKey",QCA::KeyGenerator().createRSA(2048).toPEM()).toLatin1());
|
||||
} else {
|
||||
privKey.write(QCA::KeyGenerator().createRSA(2048).toPEM().toAscii());
|
||||
privKey.write(QCA::KeyGenerator().createRSA(2048).toPEM().toLatin1());
|
||||
}
|
||||
privKey.close();
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ bool NetworkPackage::decrypt(QCA::PrivateKey& key, NetworkPackage* out) const
|
|||
|
||||
QByteArray decryptedJson;
|
||||
Q_FOREACH(const QString& chunk, chunks) {
|
||||
const QByteArray encryptedChunk = QByteArray::fromBase64(chunk.toAscii());
|
||||
const QByteArray encryptedChunk = QByteArray::fromBase64(chunk.toLatin1());
|
||||
QCA::SecureArray decryptedChunk;
|
||||
bool success = key.decrypt(encryptedChunk, &decryptedChunk, NetworkPackage::EncryptionAlgorithm);
|
||||
if (!success) {
|
||||
|
|
Loading…
Reference in a new issue