1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(cleanup): replace remaining deprecated toxcore enums

Some were missed in 5ae738f818.

Fix #5997
This commit is contained in:
Anthony Bilinski 2020-04-13 01:18:25 -07:00
parent 35f89612ff
commit d028f9e394
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ void CoreFile::sendFile(uint32_t friendId, QString filename, QString filePath,
QMutexLocker{coreLoopLock};
ToxString fileName(filename);
TOX_ERR_FILE_SEND sendErr;
Tox_Err_File_Send sendErr;
uint32_t fileNum = tox_file_send(tox, friendId, TOX_FILE_KIND_DATA, filesize,
nullptr, fileName.data(), fileName.size(), &sendErr);
if (sendErr != TOX_ERR_FILE_SEND_OK) {

View File

@ -186,7 +186,7 @@ std::unique_ptr<ToxEncrypt> ToxEncrypt::makeToxEncrypt(const QString& password,
return std::unique_ptr<ToxEncrypt>{};
}
TOX_ERR_GET_SALT saltError;
Tox_Err_Get_Salt saltError;
uint8_t salt[TOX_PASS_SALT_LENGTH];
tox_get_salt(reinterpret_cast<const uint8_t*>(toxSave.constData()), salt, &saltError);
@ -196,7 +196,7 @@ std::unique_ptr<ToxEncrypt> ToxEncrypt::makeToxEncrypt(const QString& password,
}
QByteArray pass = password.toUtf8();
TOX_ERR_KEY_DERIVATION keyError;
Tox_Err_Key_Derivation keyError;
Tox_Pass_Key* const passKey = tox_pass_key_derive_with_salt(
reinterpret_cast<const uint8_t*>(pass.constData()),
static_cast<size_t>(pass.length()), salt, &keyError);