TaskTree: Remove GroupConfig / GroupAction

Use TaskAction for dynamic group setup. Get rid of possibility
of selecting group's children to be started inside group setup.
Use dynamic children's setup instead, so that each individual child
may decide itself whether it wants to be started or not.

Change-Id: Ie31f707791db0dc26be92663ca6238b8e49c3b98
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2023-01-20 10:44:21 +01:00
parent 01faf0843d
commit 98ff1d32f9
5 changed files with 42 additions and 94 deletions

View File

@@ -5,8 +5,8 @@
#include "utils_global.h"
#include <QHash>
#include <QObject>
#include <QSet>
#include <QSharedPointer>
namespace Utils {
@@ -101,14 +101,6 @@ enum class WorkflowPolicy {
Optional // Returns always done after all children finished
};
enum class GroupAction
{
ContinueAll,
ContinueSelected,
StopWithDone,
StopWithError
};
enum class TaskAction
{
Continue,
@@ -116,13 +108,6 @@ enum class TaskAction
StopWithError
};
class GroupConfig
{
public:
GroupAction action = GroupAction::ContinueAll;
QSet<int> childrenToRun = {};
};
class QTCREATOR_UTILS_EXPORT TaskItem
{
public:
@@ -135,7 +120,7 @@ public:
// Called when group entered / after group ended with success or failure
using GroupSimpleHandler = std::function<void()>;
// Called when group entered
using GroupSetupHandler = std::function<GroupConfig()>;
using GroupSetupHandler = std::function<TaskAction()>;
struct TaskHandler {
TaskCreateHandler m_createHandler;