fix: make MultipleOptionsTask inherit directly from SequentialTask
It's not a good idea to have multiple concurrent tasks running on a sequential thing like this one. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
247f99ce2f
commit
064ae49d2b
@ -2,7 +2,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
MultipleOptionsTask::MultipleOptionsTask(QObject* parent, const QString& task_name) : ConcurrentTask(parent, task_name) {}
|
||||
MultipleOptionsTask::MultipleOptionsTask(QObject* parent, const QString& task_name) : SequentialTask(parent, task_name) {}
|
||||
|
||||
void MultipleOptionsTask::startNext()
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "ConcurrentTask.h"
|
||||
#include "SequentialTask.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 ConcurrentTask {
|
||||
class MultipleOptionsTask : public SequentialTask {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MultipleOptionsTask(QObject* parent = nullptr, const QString& task_name = "");
|
||||
|
Loading…
Reference in New Issue
Block a user