diff options
author | flow <flowlnlnln@gmail.com> | 2022-07-25 16:48:29 -0300 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-26 20:33:33 +0200 |
commit | 0382f33c46b26b6286d45622c97732c4329ddf7d (patch) | |
tree | c4969c4998eb43caa4d17198eae06f16d4c1c59e /launcher | |
parent | 13372f3f993efcf72c93af5f3169cc01d445f46e (diff) | |
download | PrismLauncher-0382f33c46b26b6286d45622c97732c4329ddf7d.tar.gz PrismLauncher-0382f33c46b26b6286d45622c97732c4329ddf7d.tar.bz2 PrismLauncher-0382f33c46b26b6286d45622c97732c4329ddf7d.zip |
fix(ui): pump events to show "Copying modpack files..." text
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/modplatform/modpacksch/FTBPackInstallTask.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp index bad0f149..8483d312 100644 --- a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp +++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp @@ -280,10 +280,13 @@ void PackInstallTask::downloadPack() void PackInstallTask::install() { - m_abortable = false; + setStatus(tr("Copying modpack files...")); + setProgress(0, filesToCopy.size()); + QCoreApplication::processEvents(); - setStatus(tr("Copying modpack files")); + m_abortable = false; + int i = 0; for (auto iter = filesToCopy.cbegin(); iter != filesToCopy.cend(); iter++) { auto& to = iter.key(); auto& from = iter.value(); @@ -293,9 +296,13 @@ void PackInstallTask::install() emitFailed(tr("Failed to copy files")); return; } + + setProgress(i++, filesToCopy.size()); + QCoreApplication::processEvents(); } - setStatus(tr("Installing modpack")); + setStatus(tr("Installing modpack...")); + QCoreApplication::processEvents(); auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg"); auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath); |