Split in two the options

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-07-14 22:26:22 +03:00
parent cebb4dd17a
commit db9f5f44e0
17 changed files with 55 additions and 22 deletions

View File

@ -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; };