diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-05-12 09:47:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 09:47:19 +0200 |
commit | c5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f (patch) | |
tree | b261ced954e5cccc7dd0f27d880689174a692d3b /launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp | |
parent | ce5bb29c442cee3654c5f4287a999d5d6593032f (diff) | |
parent | b16829b0f9a24dba9d4c9582f82affb30a416f1b (diff) | |
download | PrismLauncher-c5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f.tar.gz PrismLauncher-c5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f.tar.bz2 PrismLauncher-c5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f.zip |
Merge pull request #961 from Ryex/better-tasks
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp')
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp b/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp index 6814e645..bb8227aa 100644 --- a/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp +++ b/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp @@ -11,6 +11,7 @@ #include "net/ChecksumValidator.h" +#include "net/NetJob.h" #include "settings/INISettingsObject.h" #include "ui/dialogs/CustomMessageBox.h" @@ -223,7 +224,7 @@ bool ModrinthCreationTask::createInstance() instance.setName(name()); instance.saveNow(); - m_files_job.reset(new NetJob(tr("Mod download"), APPLICATION->network())); + m_files_job.reset(new NetJob(tr("Mod Download Modrinth"), APPLICATION->network())); auto root_modpack_path = FS::PathCombine(m_stagingPath, ".minecraft"); auto root_modpack_url = QUrl::fromLocalFile(root_modpack_path); @@ -262,7 +263,11 @@ bool ModrinthCreationTask::createInstance() setError(reason); }); connect(m_files_job.get(), &NetJob::finished, &loop, &QEventLoop::quit); - connect(m_files_job.get(), &NetJob::progress, [&](qint64 current, qint64 total) { setProgress(current, total); }); + connect(m_files_job.get(), &NetJob::progress, [&](qint64 current, qint64 total) { + setDetails(tr("%1 out of %2 complete").arg(current).arg(total)); + setProgress(current, total); + }); + connect(m_files_job.get(), &NetJob::stepProgress, this, &ModrinthCreationTask::propogateStepProgress); setStatus(tr("Downloading mods...")); m_files_job->start(); |