mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-08-03 19:37:45 -04:00
small fixes
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
078de50951
commit
5be62615ea
@ -138,7 +138,7 @@ void BaseEntityLoadTask::executeTask()
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (const Exception& e) {
|
} catch (const Exception& e) {
|
||||||
qDebug() << QString("Unable to parse file %1: %2").arg(fname, e.cause());
|
qCritical() << QString("Unable to parse file %1: %2").arg(fname, e.cause());
|
||||||
// just make sure it's gone and we never consider it again.
|
// just make sure it's gone and we never consider it again.
|
||||||
FS::deletePath(fname);
|
FS::deletePath(fname);
|
||||||
m_entity->m_load_status = BaseEntity::LoadStatus::NotLoaded;
|
m_entity->m_load_status = BaseEntity::LoadStatus::NotLoaded;
|
||||||
@ -167,10 +167,10 @@ void BaseEntityLoadTask::executeTask()
|
|||||||
m_task->addNetAction(dl);
|
m_task->addNetAction(dl);
|
||||||
m_task->setAskRetry(false);
|
m_task->setAskRetry(false);
|
||||||
connect(m_task.get(), &Task::failed, this, &BaseEntityLoadTask::emitFailed);
|
connect(m_task.get(), &Task::failed, this, &BaseEntityLoadTask::emitFailed);
|
||||||
connect(m_task.get(), &Task::succeeded, this, &BaseEntityLoadTask::emitSucceeded);
|
|
||||||
connect(m_task.get(), &Task::succeeded, this, [this]() {
|
connect(m_task.get(), &Task::succeeded, this, [this]() {
|
||||||
m_entity->m_load_status = BaseEntity::LoadStatus::Remote;
|
m_entity->m_load_status = BaseEntity::LoadStatus::Remote;
|
||||||
m_entity->m_file_sha256 = m_entity->m_sha256;
|
m_entity->m_file_sha256 = m_entity->m_sha256;
|
||||||
|
emitSucceeded();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_task.get(), &Task::progress, this, &Task::setProgress);
|
connect(m_task.get(), &Task::progress, this, &Task::setProgress);
|
||||||
|
@ -72,7 +72,7 @@ class ChecksumValidator : public Validator {
|
|||||||
auto validate(QNetworkReply&) -> bool override
|
auto validate(QNetworkReply&) -> bool override
|
||||||
{
|
{
|
||||||
if (m_expected.size() && m_expected != hash()) {
|
if (m_expected.size() && m_expected != hash()) {
|
||||||
qWarning() << "Checksum mismatch, download is bad.";
|
qCritical() << "Checksum mismatch, download is bad.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user