mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 13:17:41 +02:00
remove task parent from constuctor
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -45,8 +45,7 @@ ModUpdateDialog::ModUpdateDialog(QWidget* parent,
|
||||
, m_parent(parent)
|
||||
, m_mod_model(mods)
|
||||
, m_candidates(search_for)
|
||||
, m_second_try_metadata(
|
||||
new ConcurrentTask(nullptr, "Second Metadata Search", APPLICATION->settings()->get("NumberOfConcurrentTasks").toInt()))
|
||||
, m_second_try_metadata(new ConcurrentTask("Second Metadata Search", APPLICATION->settings()->get("NumberOfConcurrentTasks").toInt()))
|
||||
, m_instance(instance)
|
||||
, m_include_deps(includeDeps)
|
||||
{
|
||||
@ -89,7 +88,7 @@ void ModUpdateDialog::checkCandidates()
|
||||
auto versions = mcVersions(m_instance);
|
||||
auto loadersList = mcLoadersList(m_instance);
|
||||
|
||||
SequentialTask check_task(m_parent, tr("Checking for updates"));
|
||||
SequentialTask check_task(tr("Checking for updates"));
|
||||
|
||||
if (!m_modrinth_to_update.empty()) {
|
||||
m_modrinth_check_task.reset(new ModrinthCheckUpdate(m_modrinth_to_update, versions, loadersList, m_mod_model));
|
||||
@ -187,7 +186,7 @@ void ModUpdateDialog::checkCandidates()
|
||||
}
|
||||
|
||||
if (m_include_deps && !APPLICATION->settings()->get("ModDependenciesDisabled").toBool()) { // dependencies
|
||||
auto depTask = makeShared<GetModDependenciesTask>(this, m_instance, m_mod_model.get(), selectedVers);
|
||||
auto depTask = makeShared<GetModDependenciesTask>(m_instance, m_mod_model.get(), selectedVers);
|
||||
|
||||
connect(depTask.get(), &Task::failed, this,
|
||||
[&](QString reason) { CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->exec(); });
|
||||
@ -261,7 +260,7 @@ auto ModUpdateDialog::ensureMetadata() -> bool
|
||||
{
|
||||
auto index_dir = indexDir();
|
||||
|
||||
SequentialTask seq(m_parent, tr("Looking for metadata"));
|
||||
SequentialTask seq(tr("Looking for metadata"));
|
||||
|
||||
// A better use of data structures here could remove the need for this QHash
|
||||
QHash<QString, bool> should_try_others;
|
||||
|
Reference in New Issue
Block a user