refactor: make MultipleOptionsTask inherit from ConcurrentTask too

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-07-21 22:40:06 -03:00
parent e899699918
commit 87a0482b8b
2 changed files with 19 additions and 42 deletions

View File

@ -1,19 +1,17 @@
#pragma once
#include "SequentialTask.h"
#include "ConcurrentTask.h"
/* This task type will attempt to do run each of it's subtasks in sequence,
* until one of them succeeds. When that happens, the remaining tasks will not run.
* */
class MultipleOptionsTask : public SequentialTask
{
class MultipleOptionsTask : public ConcurrentTask {
Q_OBJECT
public:
explicit MultipleOptionsTask(QObject *parent = nullptr, const QString& task_name = "");
virtual ~MultipleOptionsTask() = default;
public:
explicit MultipleOptionsTask(QObject* parent = nullptr, const QString& task_name = "");
~MultipleOptionsTask() override = default;
private
slots:
private slots:
void startNext() override;
void subTaskFailed(const QString &msg) override;
void updateState() override;
};