feat: add MultipleOptionsTask
This is a variation of a Sequential Task, in which a subtask failing will prompt the next one to execute, and a subtask being successful will stop the task. This way, this can be used for easily managing fallbacks with tasks. :D Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -20,17 +20,17 @@ public:
|
||||
|
||||
void addTask(Task::Ptr task);
|
||||
|
||||
protected slots:
|
||||
void executeTask() override;
|
||||
public slots:
|
||||
bool abort() override;
|
||||
|
||||
private
|
||||
protected
|
||||
slots:
|
||||
void startNext();
|
||||
void subTaskFailed(const QString &msg);
|
||||
void subTaskStatus(const QString &msg);
|
||||
void subTaskProgress(qint64 current, qint64 total);
|
||||
void executeTask() override;
|
||||
|
||||
virtual void startNext();
|
||||
virtual void subTaskFailed(const QString &msg);
|
||||
virtual void subTaskStatus(const QString &msg);
|
||||
virtual void subTaskProgress(qint64 current, qint64 total);
|
||||
|
||||
protected:
|
||||
void setStepStatus(QString status) { m_step_status = status; emit stepStatus(status); };
|
||||
|
Reference in New Issue
Block a user