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/flame | |
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/flame')
-rw-r--r-- | launcher/modplatform/flame/FlameInstanceCreationTask.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/launcher/modplatform/flame/FlameInstanceCreationTask.cpp b/launcher/modplatform/flame/FlameInstanceCreationTask.cpp index 964b559c..86fd2ab4 100644 --- a/launcher/modplatform/flame/FlameInstanceCreationTask.cpp +++ b/launcher/modplatform/flame/FlameInstanceCreationTask.cpp @@ -35,6 +35,7 @@ #include "FlameInstanceCreationTask.h" +#include "modplatform/flame/FileResolvingTask.h" #include "modplatform/flame/FlameAPI.h" #include "modplatform/flame/PackManifest.h" @@ -382,7 +383,7 @@ bool FlameCreationTask::createInstance() }); connect(m_mod_id_resolver.get(), &Flame::FileResolvingTask::progress, this, &FlameCreationTask::setProgress); connect(m_mod_id_resolver.get(), &Flame::FileResolvingTask::status, this, &FlameCreationTask::setStatus); - + connect(m_mod_id_resolver.get(), &Flame::FileResolvingTask::stepProgress, this, &FlameCreationTask::propogateStepProgress); m_mod_id_resolver->start(); loop.exec(); @@ -452,7 +453,7 @@ void FlameCreationTask::idResolverSucceeded(QEventLoop& loop) void FlameCreationTask::setupDownloadJob(QEventLoop& loop) { - m_files_job.reset(new NetJob(tr("Mod download"), APPLICATION->network())); + m_files_job.reset(new NetJob(tr("Mod Download Flame"), APPLICATION->network())); for (const auto& result : m_mod_id_resolver->getResults().files) { QString filename = result.fileName; if (!result.required) { @@ -496,7 +497,11 @@ void FlameCreationTask::setupDownloadJob(QEventLoop& loop) m_files_job.reset(); setError(reason); }); - connect(m_files_job.get(), &NetJob::progress, this, &FlameCreationTask::setProgress); + connect(m_files_job.get(), &NetJob::progress, this, [this](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, &FlameCreationTask::propogateStepProgress); connect(m_files_job.get(), &NetJob::finished, &loop, &QEventLoop::quit); setStatus(tr("Downloading mods...")); |