diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-14 22:26:22 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-14 22:26:22 +0300 |
commit | db9f5f44e08dae27578f0d74e5092f47e40a1216 (patch) | |
tree | 699110c02fafd5d2d843925e877aaa83066fb915 /launcher/tasks | |
parent | cebb4dd17ae9bfab35210250ab7a5484c644abb0 (diff) | |
download | PrismLauncher-db9f5f44e08dae27578f0d74e5092f47e40a1216.tar.gz PrismLauncher-db9f5f44e08dae27578f0d74e5092f47e40a1216.tar.bz2 PrismLauncher-db9f5f44e08dae27578f0d74e5092f47e40a1216.zip |
Split in two the options
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/tasks')
-rw-r--r-- | launcher/tasks/ConcurrentTask.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/tasks/ConcurrentTask.h b/launcher/tasks/ConcurrentTask.h index 7130ca3a..1c333ce0 100644 --- a/launcher/tasks/ConcurrentTask.h +++ b/launcher/tasks/ConcurrentTask.h @@ -41,7 +41,6 @@ #include <QUuid> #include <memory> -#include "Application.h" #include "tasks/Task.h" class ConcurrentTask : public Task { @@ -49,11 +48,12 @@ class ConcurrentTask : public Task { public: using Ptr = shared_qobject_ptr<ConcurrentTask>; - explicit ConcurrentTask(QObject* parent = nullptr, - QString task_name = "", - int max_concurrent = APPLICATION->settings()->get("NumberOfConcurrentTasks").toInt()); + explicit ConcurrentTask(QObject* parent = nullptr, QString task_name = "", int max_concurrent = 6); ~ConcurrentTask() override; + // safe to call before starting the task + void setMaxConcurrent(int max_concurrent) { m_total_max_size = max_concurrent; } + bool canAbort() const override { return true; } inline auto isMultiStep() const -> bool override { return totalSize() > 1; }; |