feat: use ConcurrentTask for mod downloads
Way faster :) Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
8e80b4bfc1
commit
02201631e7
@ -60,7 +60,7 @@
|
|||||||
#include "modplatform/ModAPI.h"
|
#include "modplatform/ModAPI.h"
|
||||||
|
|
||||||
#include "Version.h"
|
#include "Version.h"
|
||||||
#include "tasks/SequentialTask.h"
|
#include "tasks/ConcurrentTask.h"
|
||||||
#include "ui/dialogs/ProgressDialog.h"
|
#include "ui/dialogs/ProgressDialog.h"
|
||||||
|
|
||||||
ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel> mods, QWidget* parent)
|
ModFolderPage::ModFolderPage(BaseInstance* inst, std::shared_ptr<ModFolderModel> mods, QWidget* parent)
|
||||||
@ -127,7 +127,7 @@ void ModFolderPage::installMods()
|
|||||||
|
|
||||||
ModDownloadDialog mdownload(m_model, this, m_instance);
|
ModDownloadDialog mdownload(m_model, this, m_instance);
|
||||||
if (mdownload.exec()) {
|
if (mdownload.exec()) {
|
||||||
SequentialTask* tasks = new SequentialTask(this);
|
ConcurrentTask* tasks = new ConcurrentTask(this);
|
||||||
connect(tasks, &Task::failed, [this, tasks](QString reason) {
|
connect(tasks, &Task::failed, [this, tasks](QString reason) {
|
||||||
CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
|
CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Critical)->show();
|
||||||
tasks->deleteLater();
|
tasks->deleteLater();
|
||||||
|
Loading…
Reference in New Issue
Block a user