aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/tasks')
-rw-r--r--launcher/tasks/ConcurrentTask.h8
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; };