Qt5: toAscii() and fromAscii() Methods are deprecated

This commit is contained in:
Mark Morschhäuser 2014-06-20 16:55:26 +02:00
parent a903c231f2
commit 6fa94dd475
3 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@ QString PasswordHasher::computeHash(const QString &password, const QString &salt
const int algo = GCRY_MD_SHA512;
const int rounds = 1000;
QByteArray passwordBuffer = (salt + password).toAscii();
QByteArray passwordBuffer = (salt + password).toLatin1();
int hashLen = gcry_md_get_algo_dlen(algo);
char hash[hashLen], tmp[hashLen];
gcry_md_hash_buffer(algo, hash, passwordBuffer.data(), passwordBuffer.size());