diff options
author | flow <thiagodonato300@gmail.com> | 2022-05-01 11:08:00 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-05-21 08:36:36 -0300 |
commit | 166f8727121399f7604d25580ced39472e9a3034 (patch) | |
tree | a7172abed06076190f0befada203eb7ed386bf04 /launcher/ui/pages | |
parent | 8f2c485c926e53f8b31f420f3d5caec090982498 (diff) | |
download | PrismLauncher-166f8727121399f7604d25580ced39472e9a3034.tar.gz PrismLauncher-166f8727121399f7604d25580ced39472e9a3034.tar.bz2 PrismLauncher-166f8727121399f7604d25580ced39472e9a3034.zip |
fix: various issues with ProgressDialog and SequentialTasks
- Fix aborting sequential tasks
- Fix displaying wrong number of tasks concluded
- Fix text cutting when the URL is too big
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r-- | launcher/ui/pages/instance/ModFolderPage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp index 8113fe85..cba25564 100644 --- a/launcher/ui/pages/instance/ModFolderPage.cpp +++ b/launcher/ui/pages/instance/ModFolderPage.cpp @@ -402,6 +402,10 @@ void ModFolderPage::on_actionInstall_mods_triggered() CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show(); tasks->deleteLater(); }); + connect(tasks, &Task::aborted, [this, tasks]() { + CustomMessageBox::selectable(this, tr("Aborted"), tr("Download stopped by user."), QMessageBox::Information)->show(); + tasks->deleteLater(); + }); connect(tasks, &Task::succeeded, [this, tasks]() { QStringList warnings = tasks->warnings(); if (warnings.count()) { CustomMessageBox::selectable(this, tr("Warnings"), warnings.join('\n'), QMessageBox::Warning)->show(); } @@ -411,6 +415,7 @@ void ModFolderPage::on_actionInstall_mods_triggered() for (auto task : mdownload.getTasks()) { tasks->addTask(task); } + ProgressDialog loadDialog(this); loadDialog.setSkipButton(true, tr("Abort")); loadDialog.execWithTask(tasks); |