Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into filters
This commit is contained in:
commit
763eab6b96
46 changed files with 324 additions and 152 deletions
|
@ -207,6 +207,10 @@ void ResourceModel::loadEntry(QModelIndex& entry)
|
|||
return;
|
||||
versionRequestSucceeded(doc, pack, entry);
|
||||
};
|
||||
if (!callbacks.on_fail)
|
||||
callbacks.on_fail = [](QString reason, int) {
|
||||
QMessageBox::critical(nullptr, tr("Error"), tr("A network error occurred. Could not load project versions:%1").arg(reason));
|
||||
};
|
||||
|
||||
if (auto job = m_api->getProjectVersions(std::move(args), std::move(callbacks)); job)
|
||||
runInfoJob(job);
|
||||
|
@ -230,6 +234,12 @@ void ResourceModel::loadEntry(QModelIndex& entry)
|
|||
return;
|
||||
QMessageBox::critical(nullptr, tr("Error"), tr("A network error occurred. Could not load project info:%1").arg(reason));
|
||||
};
|
||||
if (!callbacks.on_abort)
|
||||
callbacks.on_abort = [this] {
|
||||
if (!s_running_models.constFind(this).value())
|
||||
return;
|
||||
qCritical() << tr("The request was abborted for an unknown reason");
|
||||
};
|
||||
|
||||
if (auto job = m_api->getProjectInfo(std::move(args), std::move(callbacks)); job)
|
||||
runInfoJob(job);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue