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:
		@@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <QDebug>
 | 
					#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()
 | 
					void MultipleOptionsTask::startNext()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,11 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "ConcurrentTask.h"
 | 
					#include "SequentialTask.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* This task type will attempt to do run each of it's subtasks in sequence,
 | 
					/* 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.
 | 
					 * until one of them succeeds. When that happens, the remaining tasks will not run.
 | 
				
			||||||
 * */
 | 
					 * */
 | 
				
			||||||
class MultipleOptionsTask : public ConcurrentTask {
 | 
					class MultipleOptionsTask : public SequentialTask {
 | 
				
			||||||
    Q_OBJECT
 | 
					    Q_OBJECT
 | 
				
			||||||
   public:
 | 
					   public:
 | 
				
			||||||
    explicit MultipleOptionsTask(QObject* parent = nullptr, const QString& task_name = "");
 | 
					    explicit MultipleOptionsTask(QObject* parent = nullptr, const QString& task_name = "");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user