fixed some asan stuf
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
04acd27dab
commit
dba54332fb
@ -72,7 +72,7 @@ void ModrinthCheckUpdate::executeTask()
|
|||||||
auto response = std::make_shared<QByteArray>();
|
auto response = std::make_shared<QByteArray>();
|
||||||
auto job = api.latestVersions(hashes, best_hash_type, m_game_versions, m_loaders, response);
|
auto job = api.latestVersions(hashes, best_hash_type, m_game_versions, m_loaders, response);
|
||||||
|
|
||||||
connect(job.get(), &Task::succeeded, this, [this, response, &mappings, best_hash_type, job] {
|
connect(job.get(), &Task::succeeded, this, [this, response, mappings, best_hash_type, job] {
|
||||||
QJsonParseError parse_error{};
|
QJsonParseError parse_error{};
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
|
QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
|
||||||
if (parse_error.error != QJsonParseError::NoError) {
|
if (parse_error.error != QJsonParseError::NoError) {
|
||||||
|
@ -58,14 +58,14 @@ void ImgurUpload::init()
|
|||||||
|
|
||||||
QNetworkReply* ImgurUpload::getReply(QNetworkRequest& request)
|
QNetworkReply* ImgurUpload::getReply(QNetworkRequest& request)
|
||||||
{
|
{
|
||||||
auto file = new QFile(m_fileInfo.absoluteFilePath());
|
auto file = new QFile(m_fileInfo.absoluteFilePath(), this);
|
||||||
|
|
||||||
if (!file->open(QFile::ReadOnly)) {
|
if (!file->open(QFile::ReadOnly)) {
|
||||||
emitFailed();
|
emitFailed();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QHttpMultiPart* multipart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
|
QHttpMultiPart* multipart = new QHttpMultiPart(QHttpMultiPart::FormDataType, this);
|
||||||
file->setParent(multipart);
|
file->setParent(multipart);
|
||||||
QHttpPart filePart;
|
QHttpPart filePart;
|
||||||
filePart.setBodyDevice(file);
|
filePart.setBodyDevice(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user