forked from qt-creator/qt-creator
TaskTree: Rename TaskAction into SetupResult
It's only used as a return value from group's or task's setup handler. It instructs the running task tree on how to proceed further. It addresses the 21th point in the bugreport below. Task-number: QTCREATORBUG-28741 Change-Id: I25802c76b9e7bc044c6a38197935798d2da9ad02 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -83,14 +83,14 @@ public:
|
|||||||
"It is possible that no barrier was added to the tree, "
|
"It is possible that no barrier was added to the tree, "
|
||||||
"or the storage is not reachable from where it is referenced. "
|
"or the storage is not reachable from where it is referenced. "
|
||||||
"The WaitForBarrier task will finish with error. ");
|
"The WaitForBarrier task will finish with error. ");
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
Barrier *activeSharedBarrier = activeBarrier->barrier();
|
Barrier *activeSharedBarrier = activeBarrier->barrier();
|
||||||
const std::optional<bool> result = activeSharedBarrier->result();
|
const std::optional<bool> result = activeSharedBarrier->result();
|
||||||
if (result.has_value())
|
if (result.has_value())
|
||||||
return result.value() ? TaskAction::StopWithDone : TaskAction::StopWithError;
|
return result.value() ? SetupResult::StopWithDone : SetupResult::StopWithError;
|
||||||
QObject::connect(activeSharedBarrier, &Barrier::done, &barrier, &Barrier::stopWithResult);
|
QObject::connect(activeSharedBarrier, &Barrier::done, &barrier, &Barrier::stopWithResult);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
}) {}
|
}) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ private:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\enum Tasking::TaskAction
|
\enum Tasking::SetupResult
|
||||||
|
|
||||||
This enum is optionally returned from the group's or task's setup handler function.
|
This enum is optionally returned from the group's or task's setup handler function.
|
||||||
It instructs the running task tree on how to proceed after the setup handler's execution
|
It instructs the running task tree on how to proceed after the setup handler's execution
|
||||||
@@ -264,21 +264,21 @@ private:
|
|||||||
/*!
|
/*!
|
||||||
\typealias GroupItem::GroupSetupHandler
|
\typealias GroupItem::GroupSetupHandler
|
||||||
|
|
||||||
Type alias for \c std::function<TaskAction()>.
|
Type alias for \c std::function<SetupResult()>.
|
||||||
|
|
||||||
The GroupSetupHandler is used when constructing the onGroupSetup() element.
|
The GroupSetupHandler is used when constructing the onGroupSetup() element.
|
||||||
Any function with the above signature, when passed as a group setup handler,
|
Any function with the above signature, when passed as a group setup handler,
|
||||||
will be called by the running task tree when the group execution starts.
|
will be called by the running task tree when the group execution starts.
|
||||||
|
|
||||||
The return value of the handler instructs the running group on how to proceed
|
The return value of the handler instructs the running group on how to proceed
|
||||||
after the handler's invocation is finished. The default return value of TaskAction::Continue
|
after the handler's invocation is finished. The default return value of SetupResult::Continue
|
||||||
instructs the group to continue running, i.e. to start executing its child tasks.
|
instructs the group to continue running, i.e. to start executing its child tasks.
|
||||||
The return value of TaskAction::StopWithDone or TaskAction::StopWithError
|
The return value of SetupResult::StopWithDone or SetupResult::StopWithError
|
||||||
instructs the group to skip the child tasks' execution and finish immediately with
|
instructs the group to skip the child tasks' execution and finish immediately with
|
||||||
success or an error, respectively.
|
success or an error, respectively.
|
||||||
|
|
||||||
When the return type is either TaskAction::StopWithDone
|
When the return type is either SetupResult::StopWithDone
|
||||||
of TaskAction::StopWithError, the group's done or error handler (if provided)
|
of SetupResult::StopWithError, the group's done or error handler (if provided)
|
||||||
is called synchronously immediately afterwards.
|
is called synchronously immediately afterwards.
|
||||||
|
|
||||||
\note Even if the group setup handler returns StopWithDone or StopWithError,
|
\note Even if the group setup handler returns StopWithDone or StopWithError,
|
||||||
@@ -287,7 +287,7 @@ private:
|
|||||||
|
|
||||||
The onGroupSetup() accepts also functions in the shortened form of \c std::function<void()>,
|
The onGroupSetup() accepts also functions in the shortened form of \c std::function<void()>,
|
||||||
i.e. the return value is void. In this case it's assumed that the return value
|
i.e. the return value is void. In this case it's assumed that the return value
|
||||||
is TaskAction::Continue by default.
|
is SetupResult::Continue by default.
|
||||||
|
|
||||||
\sa onGroupSetup()
|
\sa onGroupSetup()
|
||||||
*/
|
*/
|
||||||
@@ -311,7 +311,7 @@ private:
|
|||||||
Constructs a group's element holding the group setup handler.
|
Constructs a group's element holding the group setup handler.
|
||||||
The \a handler is invoked whenever the group starts.
|
The \a handler is invoked whenever the group starts.
|
||||||
|
|
||||||
The passed \a handler is either of \c std::function<TaskAction()> or \c std::function<void()>
|
The passed \a handler is either of \c std::function<SetupResult()> or \c std::function<void()>
|
||||||
type. For more information on possible argument type, refer to
|
type. For more information on possible argument type, refer to
|
||||||
\l {GroupItem::GroupSetupHandler}.
|
\l {GroupItem::GroupSetupHandler}.
|
||||||
|
|
||||||
@@ -432,9 +432,9 @@ const GroupItem stopOnFinished = workflowPolicy(WorkflowPolicy::StopOnFinished);
|
|||||||
const GroupItem finishAllAndDone = workflowPolicy(WorkflowPolicy::FinishAllAndDone);
|
const GroupItem finishAllAndDone = workflowPolicy(WorkflowPolicy::FinishAllAndDone);
|
||||||
const GroupItem finishAllAndError = workflowPolicy(WorkflowPolicy::FinishAllAndError);
|
const GroupItem finishAllAndError = workflowPolicy(WorkflowPolicy::FinishAllAndError);
|
||||||
|
|
||||||
static TaskAction toTaskAction(bool success)
|
static SetupResult toSetupResult(bool success)
|
||||||
{
|
{
|
||||||
return success ? TaskAction::StopWithDone : TaskAction::StopWithError;
|
return success ? SetupResult::StopWithDone : SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TreeStorageBase::isValid() const
|
bool TreeStorageBase::isValid() const
|
||||||
@@ -660,10 +660,10 @@ public:
|
|||||||
TaskContainer(TaskTreePrivate *taskTreePrivate, const GroupItem &task,
|
TaskContainer(TaskTreePrivate *taskTreePrivate, const GroupItem &task,
|
||||||
TaskNode *parentNode, TaskContainer *parentContainer)
|
TaskNode *parentNode, TaskContainer *parentContainer)
|
||||||
: m_constData(taskTreePrivate, task, parentNode, parentContainer, this) {}
|
: m_constData(taskTreePrivate, task, parentNode, parentContainer, this) {}
|
||||||
TaskAction start();
|
SetupResult start();
|
||||||
TaskAction continueStart(TaskAction startAction, int nextChild);
|
SetupResult continueStart(SetupResult startAction, int nextChild);
|
||||||
TaskAction startChildren(int nextChild);
|
SetupResult startChildren(int nextChild);
|
||||||
TaskAction childDone(bool success);
|
SetupResult childDone(bool success);
|
||||||
void stop();
|
void stop();
|
||||||
void invokeEndHandler();
|
void invokeEndHandler();
|
||||||
bool isRunning() const { return m_runtimeData.has_value(); }
|
bool isRunning() const { return m_runtimeData.has_value(); }
|
||||||
@@ -718,7 +718,7 @@ public:
|
|||||||
|
|
||||||
// If returned value != Continue, childDone() needs to be called in parent container (in caller)
|
// If returned value != Continue, childDone() needs to be called in parent container (in caller)
|
||||||
// in order to unwind properly.
|
// in order to unwind properly.
|
||||||
TaskAction start();
|
SetupResult start();
|
||||||
void stop();
|
void stop();
|
||||||
void invokeEndHandler(bool success);
|
void invokeEndHandler(bool success);
|
||||||
bool isRunning() const { return m_task || m_container.isRunning(); }
|
bool isRunning() const { return m_task || m_container.isRunning(); }
|
||||||
@@ -947,34 +947,34 @@ int TaskContainer::RuntimeData::currentLimit() const
|
|||||||
? qMin(m_doneCount + m_constData.m_parallelLimit, childCount) : childCount;
|
? qMin(m_doneCount + m_constData.m_parallelLimit, childCount) : childCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskAction TaskContainer::start()
|
SetupResult TaskContainer::start()
|
||||||
{
|
{
|
||||||
QTC_CHECK(!isRunning());
|
QTC_CHECK(!isRunning());
|
||||||
m_runtimeData.emplace(m_constData);
|
m_runtimeData.emplace(m_constData);
|
||||||
|
|
||||||
TaskAction startAction = TaskAction::Continue;
|
SetupResult startAction = SetupResult::Continue;
|
||||||
if (m_constData.m_groupHandler.m_setupHandler) {
|
if (m_constData.m_groupHandler.m_setupHandler) {
|
||||||
startAction = invokeHandler(this, m_constData.m_groupHandler.m_setupHandler);
|
startAction = invokeHandler(this, m_constData.m_groupHandler.m_setupHandler);
|
||||||
if (startAction != TaskAction::Continue) {
|
if (startAction != SetupResult::Continue) {
|
||||||
m_constData.m_taskTreePrivate->advanceProgress(m_constData.m_taskCount);
|
m_constData.m_taskTreePrivate->advanceProgress(m_constData.m_taskCount);
|
||||||
// Non-Continue TaskAction takes precedence over the workflow policy.
|
// Non-Continue SetupResult takes precedence over the workflow policy.
|
||||||
m_runtimeData->m_successBit = startAction == TaskAction::StopWithDone;
|
m_runtimeData->m_successBit = startAction == SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (startAction == TaskAction::Continue) {
|
if (startAction == SetupResult::Continue) {
|
||||||
if (m_constData.m_children.isEmpty())
|
if (m_constData.m_children.isEmpty())
|
||||||
startAction = toTaskAction(m_runtimeData->m_successBit);
|
startAction = toSetupResult(m_runtimeData->m_successBit);
|
||||||
}
|
}
|
||||||
return continueStart(startAction, 0);
|
return continueStart(startAction, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskAction TaskContainer::continueStart(TaskAction startAction, int nextChild)
|
SetupResult TaskContainer::continueStart(SetupResult startAction, int nextChild)
|
||||||
{
|
{
|
||||||
const TaskAction groupAction = startAction == TaskAction::Continue ? startChildren(nextChild)
|
const SetupResult groupAction = startAction == SetupResult::Continue ? startChildren(nextChild)
|
||||||
: startAction;
|
: startAction;
|
||||||
QTC_CHECK(isRunning()); // TODO: superfluous
|
QTC_CHECK(isRunning()); // TODO: superfluous
|
||||||
if (groupAction != TaskAction::Continue) {
|
if (groupAction != SetupResult::Continue) {
|
||||||
const bool success = m_runtimeData->updateSuccessBit(groupAction == TaskAction::StopWithDone);
|
const bool success = m_runtimeData->updateSuccessBit(groupAction == SetupResult::StopWithDone);
|
||||||
invokeEndHandler();
|
invokeEndHandler();
|
||||||
if (TaskContainer *parentContainer = m_constData.m_parentContainer) {
|
if (TaskContainer *parentContainer = m_constData.m_parentContainer) {
|
||||||
QTC_CHECK(parentContainer->isRunning());
|
QTC_CHECK(parentContainer->isRunning());
|
||||||
@@ -989,7 +989,7 @@ TaskAction TaskContainer::continueStart(TaskAction startAction, int nextChild)
|
|||||||
return groupAction;
|
return groupAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskAction TaskContainer::startChildren(int nextChild)
|
SetupResult TaskContainer::startChildren(int nextChild)
|
||||||
{
|
{
|
||||||
QTC_CHECK(isRunning());
|
QTC_CHECK(isRunning());
|
||||||
GuardLocker locker(m_runtimeData->m_startGuard);
|
GuardLocker locker(m_runtimeData->m_startGuard);
|
||||||
@@ -998,12 +998,12 @@ TaskAction TaskContainer::startChildren(int nextChild)
|
|||||||
if (i >= limit)
|
if (i >= limit)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
const TaskAction startAction = m_constData.m_children.at(i)->start();
|
const SetupResult startAction = m_constData.m_children.at(i)->start();
|
||||||
if (startAction == TaskAction::Continue)
|
if (startAction == SetupResult::Continue)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const TaskAction finalizeAction = childDone(startAction == TaskAction::StopWithDone);
|
const SetupResult finalizeAction = childDone(startAction == SetupResult::StopWithDone);
|
||||||
if (finalizeAction == TaskAction::Continue)
|
if (finalizeAction == SetupResult::Continue)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int skippedTaskCount = 0;
|
int skippedTaskCount = 0;
|
||||||
@@ -1013,10 +1013,10 @@ TaskAction TaskContainer::startChildren(int nextChild)
|
|||||||
m_constData.m_taskTreePrivate->advanceProgress(skippedTaskCount);
|
m_constData.m_taskTreePrivate->advanceProgress(skippedTaskCount);
|
||||||
return finalizeAction;
|
return finalizeAction;
|
||||||
}
|
}
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskAction TaskContainer::childDone(bool success)
|
SetupResult TaskContainer::childDone(bool success)
|
||||||
{
|
{
|
||||||
QTC_CHECK(isRunning());
|
QTC_CHECK(isRunning());
|
||||||
const int limit = m_runtimeData->currentLimit(); // Read before bumping m_doneCount and stop()
|
const int limit = m_runtimeData->currentLimit(); // Read before bumping m_doneCount and stop()
|
||||||
@@ -1028,9 +1028,9 @@ TaskAction TaskContainer::childDone(bool success)
|
|||||||
|
|
||||||
++m_runtimeData->m_doneCount;
|
++m_runtimeData->m_doneCount;
|
||||||
const bool updatedSuccess = m_runtimeData->updateSuccessBit(success);
|
const bool updatedSuccess = m_runtimeData->updateSuccessBit(success);
|
||||||
const TaskAction startAction
|
const SetupResult startAction
|
||||||
= (shouldStop || m_runtimeData->m_doneCount == m_constData.m_children.size())
|
= (shouldStop || m_runtimeData->m_doneCount == m_constData.m_children.size())
|
||||||
? toTaskAction(updatedSuccess) : TaskAction::Continue;
|
? toSetupResult(updatedSuccess) : SetupResult::Continue;
|
||||||
|
|
||||||
if (isStarting())
|
if (isStarting())
|
||||||
return startAction;
|
return startAction;
|
||||||
@@ -1064,30 +1064,30 @@ void TaskContainer::invokeEndHandler()
|
|||||||
m_runtimeData.reset();
|
m_runtimeData.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskAction TaskNode::start()
|
SetupResult TaskNode::start()
|
||||||
{
|
{
|
||||||
QTC_CHECK(!isRunning());
|
QTC_CHECK(!isRunning());
|
||||||
if (!isTask())
|
if (!isTask())
|
||||||
return m_container.start();
|
return m_container.start();
|
||||||
|
|
||||||
m_task.reset(m_taskHandler.m_createHandler());
|
m_task.reset(m_taskHandler.m_createHandler());
|
||||||
const TaskAction startAction = m_taskHandler.m_setupHandler
|
const SetupResult startAction = m_taskHandler.m_setupHandler
|
||||||
? invokeHandler(parentContainer(), m_taskHandler.m_setupHandler, *m_task.get())
|
? invokeHandler(parentContainer(), m_taskHandler.m_setupHandler, *m_task.get())
|
||||||
: TaskAction::Continue;
|
: SetupResult::Continue;
|
||||||
if (startAction != TaskAction::Continue) {
|
if (startAction != SetupResult::Continue) {
|
||||||
m_container.m_constData.m_taskTreePrivate->advanceProgress(1);
|
m_container.m_constData.m_taskTreePrivate->advanceProgress(1);
|
||||||
m_task.reset();
|
m_task.reset();
|
||||||
return startAction;
|
return startAction;
|
||||||
}
|
}
|
||||||
const std::shared_ptr<TaskAction> unwindAction
|
const std::shared_ptr<SetupResult> unwindAction
|
||||||
= std::make_shared<TaskAction>(TaskAction::Continue);
|
= std::make_shared<SetupResult>(SetupResult::Continue);
|
||||||
QObject::connect(m_task.get(), &TaskInterface::done, taskTree(), [=](bool success) {
|
QObject::connect(m_task.get(), &TaskInterface::done, taskTree(), [=](bool success) {
|
||||||
invokeEndHandler(success);
|
invokeEndHandler(success);
|
||||||
QObject::disconnect(m_task.get(), &TaskInterface::done, taskTree(), nullptr);
|
QObject::disconnect(m_task.get(), &TaskInterface::done, taskTree(), nullptr);
|
||||||
m_task.release()->deleteLater();
|
m_task.release()->deleteLater();
|
||||||
QTC_ASSERT(parentContainer() && parentContainer()->isRunning(), return);
|
QTC_ASSERT(parentContainer() && parentContainer()->isRunning(), return);
|
||||||
if (parentContainer()->isStarting())
|
if (parentContainer()->isStarting())
|
||||||
*unwindAction = toTaskAction(success);
|
*unwindAction = toSetupResult(success);
|
||||||
else
|
else
|
||||||
parentContainer()->childDone(success);
|
parentContainer()->childDone(success);
|
||||||
});
|
});
|
||||||
@@ -1326,18 +1326,18 @@ void TaskNode::invokeEndHandler(bool success)
|
|||||||
as the task tree calls it when needed. The setup handler is optional. When used,
|
as the task tree calls it when needed. The setup handler is optional. When used,
|
||||||
it must be the first argument of the task's constructor.
|
it must be the first argument of the task's constructor.
|
||||||
|
|
||||||
Optionally, the setup handler may return a TaskAction. The returned
|
Optionally, the setup handler may return a SetupResult. The returned
|
||||||
TaskAction influences the further start behavior of a given task. The
|
SetupResult influences the further start behavior of a given task. The
|
||||||
possible values are:
|
possible values are:
|
||||||
|
|
||||||
\table
|
\table
|
||||||
\header
|
\header
|
||||||
\li TaskAction Value
|
\li SetupResult Value
|
||||||
\li Brief Description
|
\li Brief Description
|
||||||
\row
|
\row
|
||||||
\li Continue
|
\li Continue
|
||||||
\li The task will be started normally. This is the default behavior when the
|
\li The task will be started normally. This is the default behavior when the
|
||||||
setup handler doesn't return TaskAction (that is, its return type is
|
setup handler doesn't return SetupResult (that is, its return type is
|
||||||
void).
|
void).
|
||||||
\row
|
\row
|
||||||
\li StopWithDone
|
\li StopWithDone
|
||||||
@@ -1409,12 +1409,12 @@ void TaskNode::invokeEndHandler(bool success)
|
|||||||
handler. If you add more than one onGroupSetup() element to a group, an assert
|
handler. If you add more than one onGroupSetup() element to a group, an assert
|
||||||
is triggered at runtime that includes an error message.
|
is triggered at runtime that includes an error message.
|
||||||
|
|
||||||
Like the task's start handler, the group start handler may return TaskAction.
|
Like the task's start handler, the group start handler may return SetupResult.
|
||||||
The returned TaskAction value affects the start behavior of the
|
The returned SetupResult value affects the start behavior of the
|
||||||
whole group. If you do not specify a group start handler or its return type
|
whole group. If you do not specify a group start handler or its return type
|
||||||
is void, the default group's action is TaskAction::Continue, so that all
|
is void, the default group's action is SetupResult::Continue, so that all
|
||||||
tasks are started normally. Otherwise, when the start handler returns
|
tasks are started normally. Otherwise, when the start handler returns
|
||||||
TaskAction::StopWithDone or TaskAction::StopWithError, the tasks are not
|
SetupResult::StopWithDone or SetupResult::StopWithError, the tasks are not
|
||||||
started (they are skipped) and the group itself reports success or failure,
|
started (they are skipped) and the group itself reports success or failure,
|
||||||
depending on the returned value, respectively.
|
depending on the returned value, respectively.
|
||||||
|
|
||||||
@@ -1422,15 +1422,15 @@ void TaskNode::invokeEndHandler(bool success)
|
|||||||
const Group root {
|
const Group root {
|
||||||
onGroupSetup([] { qDebug() << "Root setup"; }),
|
onGroupSetup([] { qDebug() << "Root setup"; }),
|
||||||
Group {
|
Group {
|
||||||
onGroupSetup([] { qDebug() << "Group 1 setup"; return TaskAction::Continue; }),
|
onGroupSetup([] { qDebug() << "Group 1 setup"; return SetupResult::Continue; }),
|
||||||
ProcessTask(...) // Process 1
|
ProcessTask(...) // Process 1
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
onGroupSetup([] { qDebug() << "Group 2 setup"; return TaskAction::StopWithDone; }),
|
onGroupSetup([] { qDebug() << "Group 2 setup"; return SetupResult::StopWithDone; }),
|
||||||
ProcessTask(...) // Process 2
|
ProcessTask(...) // Process 2
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
onGroupSetup([] { qDebug() << "Group 3 setup"; return TaskAction::StopWithError; }),
|
onGroupSetup([] { qDebug() << "Group 3 setup"; return SetupResult::StopWithError; }),
|
||||||
ProcessTask(...) // Process 3
|
ProcessTask(...) // Process 3
|
||||||
},
|
},
|
||||||
ProcessTask(...) // Process 4
|
ProcessTask(...) // Process 4
|
||||||
@@ -1446,7 +1446,7 @@ void TaskNode::invokeEndHandler(bool success)
|
|||||||
\li Comment
|
\li Comment
|
||||||
\row
|
\row
|
||||||
\li Root Group starts
|
\li Root Group starts
|
||||||
\li Doesn't return TaskAction, so its tasks are executed.
|
\li Doesn't return SetupResult, so its tasks are executed.
|
||||||
\row
|
\row
|
||||||
\li Group 1 starts
|
\li Group 1 starts
|
||||||
\li Returns Continue, so its tasks are executed.
|
\li Returns Continue, so its tasks are executed.
|
||||||
@@ -1838,7 +1838,7 @@ void TaskTree::setRecipe(const Group &recipe)
|
|||||||
Otherwise, the task tree is started.
|
Otherwise, the task tree is started.
|
||||||
|
|
||||||
The started task tree may finish synchronously,
|
The started task tree may finish synchronously,
|
||||||
for example when the main group's start handler returns TaskAction::StopWithError.
|
for example when the main group's start handler returns SetupResult::StopWithError.
|
||||||
For this reason, the connections to the done and errorOccurred signals should be
|
For this reason, the connections to the done and errorOccurred signals should be
|
||||||
established before calling start. Use isRunning() in order to detect whether
|
established before calling start. Use isRunning() in order to detect whether
|
||||||
the task tree is still running after a call to start().
|
the task tree is still running after a call to start().
|
||||||
|
|||||||
@@ -115,13 +115,13 @@ enum class WorkflowPolicy {
|
|||||||
};
|
};
|
||||||
Q_ENUM_NS(WorkflowPolicy);
|
Q_ENUM_NS(WorkflowPolicy);
|
||||||
|
|
||||||
enum class TaskAction
|
enum class SetupResult
|
||||||
{
|
{
|
||||||
Continue,
|
Continue,
|
||||||
StopWithDone,
|
StopWithDone,
|
||||||
StopWithError
|
StopWithError
|
||||||
};
|
};
|
||||||
Q_ENUM_NS(TaskAction);
|
Q_ENUM_NS(SetupResult);
|
||||||
|
|
||||||
class TASKING_EXPORT GroupItem
|
class TASKING_EXPORT GroupItem
|
||||||
{
|
{
|
||||||
@@ -129,11 +129,11 @@ public:
|
|||||||
// Internal, provided by QTC_DECLARE_CUSTOM_TASK
|
// Internal, provided by QTC_DECLARE_CUSTOM_TASK
|
||||||
using TaskCreateHandler = std::function<TaskInterface *(void)>;
|
using TaskCreateHandler = std::function<TaskInterface *(void)>;
|
||||||
// Called prior to task start, just after createHandler
|
// Called prior to task start, just after createHandler
|
||||||
using TaskSetupHandler = std::function<TaskAction(TaskInterface &)>;
|
using TaskSetupHandler = std::function<SetupResult(TaskInterface &)>;
|
||||||
// Called on task done / error
|
// Called on task done / error
|
||||||
using TaskEndHandler = std::function<void(const TaskInterface &)>;
|
using TaskEndHandler = std::function<void(const TaskInterface &)>;
|
||||||
// Called when group entered
|
// Called when group entered
|
||||||
using GroupSetupHandler = std::function<TaskAction()>;
|
using GroupSetupHandler = std::function<SetupResult()>;
|
||||||
// Called when group done / error
|
// Called when group done / error
|
||||||
using GroupEndHandler = std::function<void()>;
|
using GroupEndHandler = std::function<void()>;
|
||||||
|
|
||||||
@@ -228,17 +228,17 @@ private:
|
|||||||
static GroupSetupHandler wrapGroupSetup(SetupHandler &&handler)
|
static GroupSetupHandler wrapGroupSetup(SetupHandler &&handler)
|
||||||
{
|
{
|
||||||
static constexpr bool isDynamic
|
static constexpr bool isDynamic
|
||||||
= std::is_same_v<TaskAction, std::invoke_result_t<std::decay_t<SetupHandler>>>;
|
= std::is_same_v<SetupResult, std::invoke_result_t<std::decay_t<SetupHandler>>>;
|
||||||
constexpr bool isVoid
|
constexpr bool isVoid
|
||||||
= std::is_same_v<void, std::invoke_result_t<std::decay_t<SetupHandler>>>;
|
= std::is_same_v<void, std::invoke_result_t<std::decay_t<SetupHandler>>>;
|
||||||
static_assert(isDynamic || isVoid,
|
static_assert(isDynamic || isVoid,
|
||||||
"Group setup handler needs to take no arguments and has to return "
|
"Group setup handler needs to take no arguments and has to return "
|
||||||
"void or TaskAction. The passed handler doesn't fulfill these requirements.");
|
"void or SetupResult. The passed handler doesn't fulfill these requirements.");
|
||||||
return [=] {
|
return [=] {
|
||||||
if constexpr (isDynamic)
|
if constexpr (isDynamic)
|
||||||
return std::invoke(handler);
|
return std::invoke(handler);
|
||||||
std::invoke(handler);
|
std::invoke(handler);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -290,10 +290,10 @@ private:
|
|||||||
static_assert(isBool || isVoid,
|
static_assert(isBool || isVoid,
|
||||||
"Sync element: The synchronous function has to return void or bool.");
|
"Sync element: The synchronous function has to return void or bool.");
|
||||||
if constexpr (isBool) {
|
if constexpr (isBool) {
|
||||||
return {onGroupSetup([function] { return function() ? TaskAction::StopWithDone
|
return {onGroupSetup([function] { return function() ? SetupResult::StopWithDone
|
||||||
: TaskAction::StopWithError; })};
|
: SetupResult::StopWithError; })};
|
||||||
}
|
}
|
||||||
return {onGroupSetup([function] { function(); return TaskAction::StopWithDone; })};
|
return {onGroupSetup([function] { function(); return SetupResult::StopWithDone; })};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -344,19 +344,19 @@ public:
|
|||||||
private:
|
private:
|
||||||
template<typename SetupFunction>
|
template<typename SetupFunction>
|
||||||
static GroupItem::TaskSetupHandler wrapSetup(SetupFunction &&function) {
|
static GroupItem::TaskSetupHandler wrapSetup(SetupFunction &&function) {
|
||||||
static constexpr bool isDynamic = std::is_same_v<TaskAction,
|
static constexpr bool isDynamic = std::is_same_v<SetupResult,
|
||||||
std::invoke_result_t<std::decay_t<SetupFunction>, typename Adapter::Type &>>;
|
std::invoke_result_t<std::decay_t<SetupFunction>, typename Adapter::Type &>>;
|
||||||
constexpr bool isVoid = std::is_same_v<void,
|
constexpr bool isVoid = std::is_same_v<void,
|
||||||
std::invoke_result_t<std::decay_t<SetupFunction>, typename Adapter::Type &>>;
|
std::invoke_result_t<std::decay_t<SetupFunction>, typename Adapter::Type &>>;
|
||||||
static_assert(isDynamic || isVoid,
|
static_assert(isDynamic || isVoid,
|
||||||
"Task setup handler needs to take (Task &) as an argument and has to return "
|
"Task setup handler needs to take (Task &) as an argument and has to return "
|
||||||
"void or TaskAction. The passed handler doesn't fulfill these requirements.");
|
"void or SetupResult. The passed handler doesn't fulfill these requirements.");
|
||||||
return [=](TaskInterface &taskInterface) {
|
return [=](TaskInterface &taskInterface) {
|
||||||
Adapter &adapter = static_cast<Adapter &>(taskInterface);
|
Adapter &adapter = static_cast<Adapter &>(taskInterface);
|
||||||
if constexpr (isDynamic)
|
if constexpr (isDynamic)
|
||||||
return std::invoke(function, *adapter.task());
|
return std::invoke(function, *adapter.task());
|
||||||
std::invoke(function, *adapter.task());
|
std::invoke(function, *adapter.task());
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -355,13 +355,13 @@ void TestRunner::runTestsHelper()
|
|||||||
|
|
||||||
const auto onSetup = [this, config] {
|
const auto onSetup = [this, config] {
|
||||||
if (!config->project())
|
if (!config->project())
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
if (config->testExecutable().isEmpty()) {
|
if (config->testExecutable().isEmpty()) {
|
||||||
reportResult(ResultType::MessageFatal,
|
reportResult(ResultType::MessageFatal,
|
||||||
Tr::tr("Executable path is empty. (%1)").arg(config->displayName()));
|
Tr::tr("Executable path is empty. (%1)").arg(config->displayName()));
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onProcessSetup = [this, config, storage](Process &process) {
|
const auto onProcessSetup = [this, config, storage](Process &process) {
|
||||||
TestStorage *testStorage = storage.activeStorage();
|
TestStorage *testStorage = storage.activeStorage();
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Group QdbStopApplicationStep::deployRecipe()
|
|||||||
const auto device = DeviceKitAspect::device(target()->kit());
|
const auto device = DeviceKitAspect::device(target()->kit());
|
||||||
if (!device) {
|
if (!device) {
|
||||||
addErrorMessage(Tr::tr("No device to stop the application on."));
|
addErrorMessage(Tr::tr("No device to stop the application on."));
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
QTC_CHECK(device);
|
QTC_CHECK(device);
|
||||||
process.setCommand({device->filePath(Constants::AppcontrollerFilepath), {"--stop"}});
|
process.setCommand({device->filePath(Constants::AppcontrollerFilepath), {"--stop"}});
|
||||||
@@ -52,7 +52,7 @@ Group QdbStopApplicationStep::deployRecipe()
|
|||||||
connect(proc, &Process::readyReadStandardOutput, this, [this, proc] {
|
connect(proc, &Process::readyReadStandardOutput, this, [this, proc] {
|
||||||
handleStdOutData(proc->readAllStandardOutput());
|
handleStdOutData(proc->readAllStandardOutput());
|
||||||
});
|
});
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto doneHandler = [this](const Process &) {
|
const auto doneHandler = [this](const Process &) {
|
||||||
addProgressMessage(Tr::tr("Stopped the running application."));
|
addProgressMessage(Tr::tr("Stopped the running application."));
|
||||||
|
|||||||
@@ -128,23 +128,23 @@ GroupItem clangToolTask(const AnalyzeInputData &input,
|
|||||||
|
|
||||||
const auto onSetup = [=] {
|
const auto onSetup = [=] {
|
||||||
if (setupHandler && !setupHandler())
|
if (setupHandler && !setupHandler())
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
|
|
||||||
ClangToolStorage *data = storage.activeStorage();
|
ClangToolStorage *data = storage.activeStorage();
|
||||||
data->name = clangToolName(input.tool);
|
data->name = clangToolName(input.tool);
|
||||||
data->executable = toolExecutable(input.tool);
|
data->executable = toolExecutable(input.tool);
|
||||||
if (!data->executable.isExecutableFile()) {
|
if (!data->executable.isExecutableFile()) {
|
||||||
qWarning() << "Can't start:" << data->executable << "as" << data->name;
|
qWarning() << "Can't start:" << data->executable << "as" << data->name;
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTC_CHECK(!input.unit.arguments.contains(QLatin1String("-o")));
|
QTC_CHECK(!input.unit.arguments.contains(QLatin1String("-o")));
|
||||||
QTC_CHECK(!input.unit.arguments.contains(input.unit.file.nativePath()));
|
QTC_CHECK(!input.unit.arguments.contains(input.unit.file.nativePath()));
|
||||||
QTC_ASSERT(input.unit.file.exists(), return TaskAction::StopWithError);
|
QTC_ASSERT(input.unit.file.exists(), return SetupResult::StopWithError);
|
||||||
data->outputFilePath = createOutputFilePath(input.outputDirPath, input.unit.file);
|
data->outputFilePath = createOutputFilePath(input.outputDirPath, input.unit.file);
|
||||||
QTC_ASSERT(!data->outputFilePath.isEmpty(), return TaskAction::StopWithError);
|
QTC_ASSERT(!data->outputFilePath.isEmpty(), return SetupResult::StopWithError);
|
||||||
|
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onProcessSetup = [=](Process &process) {
|
const auto onProcessSetup = [=](Process &process) {
|
||||||
process.setEnvironment(input.environment);
|
process.setEnvironment(input.environment);
|
||||||
|
|||||||
@@ -190,11 +190,11 @@ LocatorMatcherTasks ActionsFilter::matchers()
|
|||||||
collectEntriesForCommands();
|
collectEntriesForCommands();
|
||||||
if (storage->input().simplified().isEmpty()) {
|
if (storage->input().simplified().isEmpty()) {
|
||||||
storage->reportOutput(m_entries);
|
storage->reportOutput(m_entries);
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
||||||
async.setConcurrentCallData(matches, *storage, m_entries);
|
async.setConcurrentCallData(matches, *storage, m_entries);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
return {{AsyncTask<void>(onSetup), storage}};
|
return {{AsyncTask<void>(onSetup), storage}};
|
||||||
|
|||||||
@@ -82,9 +82,9 @@ DirectoryFilter::DirectoryFilter(Id id)
|
|||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
const auto groupSetup = [this] {
|
const auto groupSetup = [this] {
|
||||||
if (!m_directories.isEmpty())
|
if (!m_directories.isEmpty())
|
||||||
return TaskAction::Continue; // Async task will run
|
return SetupResult::Continue; // Async task will run
|
||||||
m_cache.setFilePaths({});
|
m_cache.setFilePaths({});
|
||||||
return TaskAction::StopWithDone; // Group stops, skips async task
|
return SetupResult::StopWithDone; // Group stops, skips async task
|
||||||
};
|
};
|
||||||
const auto asyncSetup = [this](Async<FilePaths> &async) {
|
const auto asyncSetup = [this](Async<FilePaths> &async) {
|
||||||
async.setConcurrentCallData(&refresh, m_directories, m_filters, m_exclusionFilters,
|
async.setConcurrentCallData(&refresh, m_directories, m_filters, m_exclusionFilters,
|
||||||
|
|||||||
@@ -1503,16 +1503,16 @@ LocatorMatcherTask LocatorFileCache::matcher() const
|
|||||||
const auto onSetup = [storage, weak](Async<LocatorFileCachePrivate> &async) {
|
const auto onSetup = [storage, weak](Async<LocatorFileCachePrivate> &async) {
|
||||||
auto that = weak.lock();
|
auto that = weak.lock();
|
||||||
if (!that) // LocatorMatcher is running after *this LocatorFileCache was destructed.
|
if (!that) // LocatorMatcher is running after *this LocatorFileCache was destructed.
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
|
|
||||||
if (!that->ensureValidated())
|
if (!that->ensureValidated())
|
||||||
return TaskAction::StopWithDone; // The cache is invalid and
|
return SetupResult::StopWithDone; // The cache is invalid and
|
||||||
// no provider is set or it returned empty generator
|
// no provider is set or it returned empty generator
|
||||||
that->bumpExecutionId();
|
that->bumpExecutionId();
|
||||||
|
|
||||||
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
||||||
async.setConcurrentCallData(&filter, *storage, *that);
|
async.setConcurrentCallData(&filter, *storage, *that);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onDone = [weak](const Async<LocatorFileCachePrivate> &async) {
|
const auto onDone = [weak](const Async<LocatorFileCachePrivate> &async) {
|
||||||
auto that = weak.lock();
|
auto that = weak.lock();
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ LocatorMatcherTasks JavaScriptFilter::matchers()
|
|||||||
|
|
||||||
const auto onSetup = [storage, engine] {
|
const auto onSetup = [storage, engine] {
|
||||||
if (!engine)
|
if (!engine)
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
if (storage->input().trimmed().isEmpty()) {
|
if (storage->input().trimmed().isEmpty()) {
|
||||||
LocatorFilterEntry entry;
|
LocatorFilterEntry entry;
|
||||||
entry.displayName = Tr::tr("Reset Engine");
|
entry.displayName = Tr::tr("Reset Engine");
|
||||||
@@ -385,9 +385,9 @@ LocatorMatcherTasks JavaScriptFilter::matchers()
|
|||||||
return AcceptResult();
|
return AcceptResult();
|
||||||
};
|
};
|
||||||
storage->reportOutput({entry});
|
storage->reportOutput({entry});
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto onJavaScriptSetup = [storage, engine](JavaScriptRequest &request) {
|
const auto onJavaScriptSetup = [storage, engine](JavaScriptRequest &request) {
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ LocatorMatcherTasks SpotlightLocatorFilter::matchers()
|
|||||||
const Link link = Link::fromString(storage->input(), true);
|
const Link link = Link::fromString(storage->input(), true);
|
||||||
const FilePath input = link.targetFilePath;
|
const FilePath input = link.targetFilePath;
|
||||||
if (input.isEmpty())
|
if (input.isEmpty())
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
|
|
||||||
// only pass the file name part to allow searches like "somepath/*foo"
|
// only pass the file name part to allow searches like "somepath/*foo"
|
||||||
const std::unique_ptr<MacroExpander> expander(createMacroExpander(input.fileName()));
|
const std::unique_ptr<MacroExpander> expander(createMacroExpander(input.fileName()));
|
||||||
@@ -189,7 +189,7 @@ LocatorMatcherTasks SpotlightLocatorFilter::matchers()
|
|||||||
CommandLine::Raw);
|
CommandLine::Raw);
|
||||||
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
||||||
async.setConcurrentCallData(matches, *storage, cmd);
|
async.setConcurrentCallData(matches, *storage, cmd);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
return {{AsyncTask<void>(onSetup), storage}};
|
return {{AsyncTask<void>(onSetup), storage}};
|
||||||
|
|||||||
@@ -310,12 +310,12 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
|
|||||||
|
|
||||||
const auto setupStaged = [this, stagedFiles](Process &process) {
|
const auto setupStaged = [this, stagedFiles](Process &process) {
|
||||||
if (stagedFiles.isEmpty())
|
if (stagedFiles.isEmpty())
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
process.setCodec(VcsBaseEditor::getCodec(workingDirectory(), stagedFiles));
|
process.setCodec(VcsBaseEditor::getCodec(workingDirectory(), stagedFiles));
|
||||||
setupCommand(process, addConfigurationArguments(
|
setupCommand(process, addConfigurationArguments(
|
||||||
QStringList({"diff", "--cached", "--"}) + stagedFiles));
|
QStringList({"diff", "--cached", "--"}) + stagedFiles));
|
||||||
VcsOutputWindow::appendCommand(process.workingDirectory(), process.commandLine());
|
VcsOutputWindow::appendCommand(process.workingDirectory(), process.commandLine());
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onStagedDone = [storage](const Process &process) {
|
const auto onStagedDone = [storage](const Process &process) {
|
||||||
storage->m_stagedOutput = process.cleanedStdOut();
|
storage->m_stagedOutput = process.cleanedStdOut();
|
||||||
@@ -323,12 +323,12 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
|
|||||||
|
|
||||||
const auto setupUnstaged = [this, unstagedFiles](Process &process) {
|
const auto setupUnstaged = [this, unstagedFiles](Process &process) {
|
||||||
if (unstagedFiles.isEmpty())
|
if (unstagedFiles.isEmpty())
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
process.setCodec(VcsBaseEditor::getCodec(workingDirectory(), unstagedFiles));
|
process.setCodec(VcsBaseEditor::getCodec(workingDirectory(), unstagedFiles));
|
||||||
setupCommand(process, addConfigurationArguments(
|
setupCommand(process, addConfigurationArguments(
|
||||||
QStringList({"diff", "--"}) + unstagedFiles));
|
QStringList({"diff", "--"}) + unstagedFiles));
|
||||||
VcsOutputWindow::appendCommand(process.workingDirectory(), process.commandLine());
|
VcsOutputWindow::appendCommand(process.workingDirectory(), process.commandLine());
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onUnstagedDone = [storage](const Process &process) {
|
const auto onUnstagedDone = [storage](const Process &process) {
|
||||||
storage->m_unstagedOutput = process.cleanedStdOut();
|
storage->m_unstagedOutput = process.cleanedStdOut();
|
||||||
@@ -421,8 +421,8 @@ ShowController::ShowController(IDocument *document, const QString &id)
|
|||||||
|
|
||||||
const auto desciptionDetailsSetup = [storage] {
|
const auto desciptionDetailsSetup = [storage] {
|
||||||
if (!storage->m_postProcessDescription)
|
if (!storage->m_postProcessDescription)
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto setupBranches = [this, storage](Process &process) {
|
const auto setupBranches = [this, storage](Process &process) {
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ LocatorMatcherTask locatorMatcher(Client *client, int maxResultCount,
|
|||||||
const auto onFilterSetup = [storage, resultStorage, client, filter](Async<void> &async) {
|
const auto onFilterSetup = [storage, resultStorage, client, filter](Async<void> &async) {
|
||||||
const QList<SymbolInformation> results = *resultStorage;
|
const QList<SymbolInformation> results = *resultStorage;
|
||||||
if (results.isEmpty())
|
if (results.isEmpty())
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
async.setFutureSynchronizer(ExtensionSystem::PluginManager::futureSynchronizer());
|
||||||
async.setConcurrentCallData(filterResults, *storage, client, results, filter);
|
async.setConcurrentCallData(filterResults, *storage, client, results, filter);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
|
|||||||
@@ -149,10 +149,10 @@ GroupItem QnxDeployQtLibrariesDialogPrivate::removeDirTask()
|
|||||||
{
|
{
|
||||||
const auto setupHandler = [this](Process &process) {
|
const auto setupHandler = [this](Process &process) {
|
||||||
if (m_checkResult != CheckResult::RemoveDir)
|
if (m_checkResult != CheckResult::RemoveDir)
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
m_deployLogWindow->appendPlainText(Tr::tr("Removing \"%1\"").arg(fullRemoteDirectory()));
|
m_deployLogWindow->appendPlainText(Tr::tr("Removing \"%1\"").arg(fullRemoteDirectory()));
|
||||||
process.setCommand({m_device->filePath("rm"), {"-rf", fullRemoteDirectory()}});
|
process.setCommand({m_device->filePath("rm"), {"-rf", fullRemoteDirectory()}});
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto errorHandler = [this](const Process &process) {
|
const auto errorHandler = [this](const Process &process) {
|
||||||
QTC_ASSERT(process.exitCode() == 0, return);
|
QTC_ASSERT(process.exitCode() == 0, return);
|
||||||
@@ -167,7 +167,7 @@ GroupItem QnxDeployQtLibrariesDialogPrivate::uploadTask()
|
|||||||
const auto setupHandler = [this](FileTransfer &transfer) {
|
const auto setupHandler = [this](FileTransfer &transfer) {
|
||||||
if (m_deployableFiles.isEmpty()) {
|
if (m_deployableFiles.isEmpty()) {
|
||||||
emitProgressMessage(Tr::tr("No files need to be uploaded."));
|
emitProgressMessage(Tr::tr("No files need to be uploaded."));
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
emitProgressMessage(Tr::tr("%n file(s) need to be uploaded.", "",
|
emitProgressMessage(Tr::tr("%n file(s) need to be uploaded.", "",
|
||||||
m_deployableFiles.size()));
|
m_deployableFiles.size()));
|
||||||
@@ -177,18 +177,18 @@ GroupItem QnxDeployQtLibrariesDialogPrivate::uploadTask()
|
|||||||
const QString message = Tr::tr("Local file \"%1\" does not exist.")
|
const QString message = Tr::tr("Local file \"%1\" does not exist.")
|
||||||
.arg(file.localFilePath().toUserOutput());
|
.arg(file.localFilePath().toUserOutput());
|
||||||
emitErrorMessage(message);
|
emitErrorMessage(message);
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
files.append({file.localFilePath(), m_device->filePath(file.remoteFilePath())});
|
files.append({file.localFilePath(), m_device->filePath(file.remoteFilePath())});
|
||||||
}
|
}
|
||||||
if (files.isEmpty()) {
|
if (files.isEmpty()) {
|
||||||
emitProgressMessage(Tr::tr("No files need to be uploaded."));
|
emitProgressMessage(Tr::tr("No files need to be uploaded."));
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
transfer.setFilesToTransfer(files);
|
transfer.setFilesToTransfer(files);
|
||||||
QObject::connect(&transfer, &FileTransfer::progress,
|
QObject::connect(&transfer, &FileTransfer::progress,
|
||||||
this, &QnxDeployQtLibrariesDialogPrivate::emitProgressMessage);
|
this, &QnxDeployQtLibrariesDialogPrivate::emitProgressMessage);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto errorHandler = [this](const FileTransfer &transfer) {
|
const auto errorHandler = [this](const FileTransfer &transfer) {
|
||||||
emitErrorMessage(transfer.resultData().m_errorString);
|
emitErrorMessage(transfer.resultData().m_errorString);
|
||||||
@@ -238,7 +238,7 @@ Group QnxDeployQtLibrariesDialogPrivate::deployRecipe()
|
|||||||
const auto setupHandler = [this] {
|
const auto setupHandler = [this] {
|
||||||
if (!m_device) {
|
if (!m_device) {
|
||||||
emitErrorMessage(Tr::tr("No device configuration set."));
|
emitErrorMessage(Tr::tr("No device configuration set."));
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
QList<DeployableFile> collected;
|
QList<DeployableFile> collected;
|
||||||
for (int i = 0; i < m_deployableFiles.count(); ++i)
|
for (int i = 0; i < m_deployableFiles.count(); ++i)
|
||||||
@@ -247,18 +247,18 @@ Group QnxDeployQtLibrariesDialogPrivate::deployRecipe()
|
|||||||
QTC_CHECK(collected.size() >= m_deployableFiles.size());
|
QTC_CHECK(collected.size() >= m_deployableFiles.size());
|
||||||
m_deployableFiles = collected;
|
m_deployableFiles = collected;
|
||||||
if (!m_deployableFiles.isEmpty())
|
if (!m_deployableFiles.isEmpty())
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
|
|
||||||
emitProgressMessage(Tr::tr("No deployment action necessary. Skipping."));
|
emitProgressMessage(Tr::tr("No deployment action necessary. Skipping."));
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
};
|
};
|
||||||
const auto doneHandler = [this] {
|
const auto doneHandler = [this] {
|
||||||
emitProgressMessage(Tr::tr("All files successfully deployed."));
|
emitProgressMessage(Tr::tr("All files successfully deployed."));
|
||||||
};
|
};
|
||||||
const auto subGroupSetupHandler = [this] {
|
const auto subGroupSetupHandler = [this] {
|
||||||
if (m_checkResult == CheckResult::Abort)
|
if (m_checkResult == CheckResult::Abort)
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const Group root {
|
const Group root {
|
||||||
onGroupSetup(setupHandler),
|
onGroupSetup(setupHandler),
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ GroupItem GenericDirectUploadStep::uploadTask(const TreeStorage<UploadStorage> &
|
|||||||
const auto setupHandler = [this, storage](FileTransfer &transfer) {
|
const auto setupHandler = [this, storage](FileTransfer &transfer) {
|
||||||
if (storage->filesToUpload.isEmpty()) {
|
if (storage->filesToUpload.isEmpty()) {
|
||||||
addProgressMessage(Tr::tr("No files need to be uploaded."));
|
addProgressMessage(Tr::tr("No files need to be uploaded."));
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
addProgressMessage(Tr::tr("%n file(s) need to be uploaded.", "",
|
addProgressMessage(Tr::tr("%n file(s) need to be uploaded.", "",
|
||||||
storage->filesToUpload.size()));
|
storage->filesToUpload.size()));
|
||||||
@@ -208,19 +208,19 @@ GroupItem GenericDirectUploadStep::uploadTask(const TreeStorage<UploadStorage> &
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
addErrorMessage(message);
|
addErrorMessage(message);
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}
|
}
|
||||||
files.append({file.localFilePath(),
|
files.append({file.localFilePath(),
|
||||||
deviceConfiguration()->filePath(file.remoteFilePath())});
|
deviceConfiguration()->filePath(file.remoteFilePath())});
|
||||||
}
|
}
|
||||||
if (files.isEmpty()) {
|
if (files.isEmpty()) {
|
||||||
addProgressMessage(Tr::tr("No files need to be uploaded."));
|
addProgressMessage(Tr::tr("No files need to be uploaded."));
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
}
|
}
|
||||||
transfer.setFilesToTransfer(files);
|
transfer.setFilesToTransfer(files);
|
||||||
QObject::connect(&transfer, &FileTransfer::progress,
|
QObject::connect(&transfer, &FileTransfer::progress,
|
||||||
this, &GenericDirectUploadStep::addProgressMessage);
|
this, &GenericDirectUploadStep::addProgressMessage);
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto errorHandler = [this](const FileTransfer &transfer) {
|
const auto errorHandler = [this](const FileTransfer &transfer) {
|
||||||
addErrorMessage(transfer.resultData().m_errorString);
|
addErrorMessage(transfer.resultData().m_errorString);
|
||||||
|
|||||||
@@ -167,13 +167,13 @@ SubversionDiffEditorController::SubversionDiffEditorController(IDocument *docume
|
|||||||
|
|
||||||
const auto setupDescription = [this](Process &process) {
|
const auto setupDescription = [this](Process &process) {
|
||||||
if (m_changeNumber == 0)
|
if (m_changeNumber == 0)
|
||||||
return TaskAction::StopWithDone;
|
return SetupResult::StopWithDone;
|
||||||
setupCommand(process, {"log", "-r", QString::number(m_changeNumber)});
|
setupCommand(process, {"log", "-r", QString::number(m_changeNumber)});
|
||||||
CommandLine command = process.commandLine();
|
CommandLine command = process.commandLine();
|
||||||
command << SubversionClient::AddAuthOptions();
|
command << SubversionClient::AddAuthOptions();
|
||||||
process.setCommand(command);
|
process.setCommand(command);
|
||||||
setDescription(Tr::tr("Waiting for data..."));
|
setDescription(Tr::tr("Waiting for data..."));
|
||||||
return TaskAction::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
const auto onDescriptionDone = [this](const Process &process) {
|
const auto onDescriptionDone = [this](const Process &process) {
|
||||||
setDescription(process.cleanedStdOut());
|
setDescription(process.cleanedStdOut());
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ void tst_Tasking::testTree_data()
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto setupDynamicTask = [storage](int taskId, TaskAction action) {
|
const auto setupDynamicTask = [storage](int taskId, SetupResult action) {
|
||||||
return [storage, taskId, action](TaskObject &) {
|
return [storage, taskId, action](TaskObject &) {
|
||||||
storage->m_log.append({taskId, Handler::Setup});
|
storage->m_log.append({taskId, Handler::Setup});
|
||||||
return action;
|
return action;
|
||||||
@@ -274,7 +274,7 @@ void tst_Tasking::testTree_data()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const auto createDynamicTask = [storage, setupDynamicTask, setupDone, setupError](
|
const auto createDynamicTask = [storage, setupDynamicTask, setupDone, setupError](
|
||||||
int taskId, TaskAction action) {
|
int taskId, SetupResult action) {
|
||||||
return TestTask(setupDynamicTask(taskId, action), setupDone(taskId), setupError(taskId));
|
return TestTask(setupDynamicTask(taskId, action), setupDone(taskId), setupError(taskId));
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -302,19 +302,19 @@ void tst_Tasking::testTree_data()
|
|||||||
};
|
};
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
onGroupSetup([] { return TaskAction::Continue; }),
|
onGroupSetup([] { return SetupResult::Continue; }),
|
||||||
groupDone(0),
|
groupDone(0),
|
||||||
groupError(0)
|
groupError(0)
|
||||||
};
|
};
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
onGroupSetup([] { return TaskAction::StopWithDone; }),
|
onGroupSetup([] { return SetupResult::StopWithDone; }),
|
||||||
groupDone(0),
|
groupDone(0),
|
||||||
groupError(0)
|
groupError(0)
|
||||||
};
|
};
|
||||||
const Group root4 {
|
const Group root4 {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
onGroupSetup([] { return TaskAction::StopWithError; }),
|
onGroupSetup([] { return SetupResult::StopWithError; }),
|
||||||
groupDone(0),
|
groupDone(0),
|
||||||
groupError(0)
|
groupError(0)
|
||||||
};
|
};
|
||||||
@@ -329,22 +329,22 @@ void tst_Tasking::testTree_data()
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const auto setupGroup = [=](TaskAction taskAction, WorkflowPolicy policy) {
|
const auto setupGroup = [=](SetupResult setupResult, WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
onGroupSetup([taskAction] { return taskAction; }),
|
onGroupSetup([setupResult] { return setupResult; }),
|
||||||
groupDone(0),
|
groupDone(0),
|
||||||
groupError(0)
|
groupError(0)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto doneData = [storage, setupGroup](WorkflowPolicy policy) {
|
const auto doneData = [storage, setupGroup](WorkflowPolicy policy) {
|
||||||
return TestData{storage, setupGroup(TaskAction::StopWithDone, policy),
|
return TestData{storage, setupGroup(SetupResult::StopWithDone, policy),
|
||||||
Log{{0, Handler::GroupDone}}, 0, OnDone::Success};
|
Log{{0, Handler::GroupDone}}, 0, OnDone::Success};
|
||||||
};
|
};
|
||||||
const auto errorData = [storage, setupGroup](WorkflowPolicy policy) {
|
const auto errorData = [storage, setupGroup](WorkflowPolicy policy) {
|
||||||
return TestData{storage, setupGroup(TaskAction::StopWithError, policy),
|
return TestData{storage, setupGroup(SetupResult::StopWithError, policy),
|
||||||
Log{{0, Handler::GroupError}}, 0, OnDone::Failure};
|
Log{{0, Handler::GroupError}}, 0, OnDone::Failure};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -368,8 +368,8 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
createDynamicTask(1, TaskAction::StopWithDone),
|
createDynamicTask(1, SetupResult::StopWithDone),
|
||||||
createDynamicTask(2, TaskAction::StopWithDone)
|
createDynamicTask(2, SetupResult::StopWithDone)
|
||||||
};
|
};
|
||||||
const Log log {{1, Handler::Setup}, {2, Handler::Setup}};
|
const Log log {{1, Handler::Setup}, {2, Handler::Setup}};
|
||||||
QTest::newRow("DynamicTaskDone") << TestData{storage, root, log, 2, OnDone::Success};
|
QTest::newRow("DynamicTaskDone") << TestData{storage, root, log, 2, OnDone::Success};
|
||||||
@@ -378,8 +378,8 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
createDynamicTask(1, TaskAction::StopWithError),
|
createDynamicTask(1, SetupResult::StopWithError),
|
||||||
createDynamicTask(2, TaskAction::StopWithError)
|
createDynamicTask(2, SetupResult::StopWithError)
|
||||||
};
|
};
|
||||||
const Log log {{1, Handler::Setup}};
|
const Log log {{1, Handler::Setup}};
|
||||||
QTest::newRow("DynamicTaskError") << TestData{storage, root, log, 2, OnDone::Failure};
|
QTest::newRow("DynamicTaskError") << TestData{storage, root, log, 2, OnDone::Failure};
|
||||||
@@ -388,10 +388,10 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
createDynamicTask(1, TaskAction::Continue),
|
createDynamicTask(1, SetupResult::Continue),
|
||||||
createDynamicTask(2, TaskAction::Continue),
|
createDynamicTask(2, SetupResult::Continue),
|
||||||
createDynamicTask(3, TaskAction::StopWithError),
|
createDynamicTask(3, SetupResult::StopWithError),
|
||||||
createDynamicTask(4, TaskAction::Continue)
|
createDynamicTask(4, SetupResult::Continue)
|
||||||
};
|
};
|
||||||
const Log log {
|
const Log log {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
@@ -407,10 +407,10 @@ void tst_Tasking::testTree_data()
|
|||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
createDynamicTask(1, TaskAction::Continue),
|
createDynamicTask(1, SetupResult::Continue),
|
||||||
createDynamicTask(2, TaskAction::Continue),
|
createDynamicTask(2, SetupResult::Continue),
|
||||||
createDynamicTask(3, TaskAction::StopWithError),
|
createDynamicTask(3, SetupResult::StopWithError),
|
||||||
createDynamicTask(4, TaskAction::Continue)
|
createDynamicTask(4, SetupResult::Continue)
|
||||||
};
|
};
|
||||||
const Log log {
|
const Log log {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
@@ -426,12 +426,12 @@ void tst_Tasking::testTree_data()
|
|||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
createDynamicTask(1, TaskAction::Continue),
|
createDynamicTask(1, SetupResult::Continue),
|
||||||
createDynamicTask(2, TaskAction::Continue),
|
createDynamicTask(2, SetupResult::Continue),
|
||||||
Group {
|
Group {
|
||||||
createDynamicTask(3, TaskAction::StopWithError)
|
createDynamicTask(3, SetupResult::StopWithError)
|
||||||
},
|
},
|
||||||
createDynamicTask(4, TaskAction::Continue)
|
createDynamicTask(4, SetupResult::Continue)
|
||||||
};
|
};
|
||||||
const Log log {
|
const Log log {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
@@ -447,16 +447,16 @@ void tst_Tasking::testTree_data()
|
|||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
createDynamicTask(1, TaskAction::Continue),
|
createDynamicTask(1, SetupResult::Continue),
|
||||||
createDynamicTask(2, TaskAction::Continue),
|
createDynamicTask(2, SetupResult::Continue),
|
||||||
Group {
|
Group {
|
||||||
onGroupSetup([storage] {
|
onGroupSetup([storage] {
|
||||||
storage->m_log.append({0, Handler::GroupSetup});
|
storage->m_log.append({0, Handler::GroupSetup});
|
||||||
return TaskAction::StopWithError;
|
return SetupResult::StopWithError;
|
||||||
}),
|
}),
|
||||||
createDynamicTask(3, TaskAction::Continue)
|
createDynamicTask(3, SetupResult::Continue)
|
||||||
},
|
},
|
||||||
createDynamicTask(4, TaskAction::Continue)
|
createDynamicTask(4, SetupResult::Continue)
|
||||||
};
|
};
|
||||||
const Log log {
|
const Log log {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
@@ -1319,14 +1319,14 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const auto createRoot = [storage, createSuccessTask, groupDone, groupError](
|
const auto createRoot = [storage, createSuccessTask, groupDone, groupError](
|
||||||
TaskAction taskAction) {
|
SetupResult setupResult) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
Storage(storage),
|
||||||
Group {
|
Group {
|
||||||
createSuccessTask(1)
|
createSuccessTask(1)
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
onGroupSetup([=] { return taskAction; }),
|
onGroupSetup([=] { return setupResult; }),
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
createSuccessTask(3),
|
createSuccessTask(3),
|
||||||
createSuccessTask(4)
|
createSuccessTask(4)
|
||||||
@@ -1336,7 +1336,7 @@ void tst_Tasking::testTree_data()
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const Group root1 = createRoot(TaskAction::StopWithDone);
|
const Group root1 = createRoot(SetupResult::StopWithDone);
|
||||||
const Log log1 {
|
const Log log1 {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
{1, Handler::Done},
|
{1, Handler::Done},
|
||||||
@@ -1344,7 +1344,7 @@ void tst_Tasking::testTree_data()
|
|||||||
};
|
};
|
||||||
QTest::newRow("DynamicSetupDone") << TestData{storage, root1, log1, 4, OnDone::Success};
|
QTest::newRow("DynamicSetupDone") << TestData{storage, root1, log1, 4, OnDone::Success};
|
||||||
|
|
||||||
const Group root2 = createRoot(TaskAction::StopWithError);
|
const Group root2 = createRoot(SetupResult::StopWithError);
|
||||||
const Log log2 {
|
const Log log2 {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
{1, Handler::Done},
|
{1, Handler::Done},
|
||||||
@@ -1352,7 +1352,7 @@ void tst_Tasking::testTree_data()
|
|||||||
};
|
};
|
||||||
QTest::newRow("DynamicSetupError") << TestData{storage, root2, log2, 4, OnDone::Failure};
|
QTest::newRow("DynamicSetupError") << TestData{storage, root2, log2, 4, OnDone::Failure};
|
||||||
|
|
||||||
const Group root3 = createRoot(TaskAction::Continue);
|
const Group root3 = createRoot(SetupResult::Continue);
|
||||||
const Log log3 {
|
const Log log3 {
|
||||||
{1, Handler::Setup},
|
{1, Handler::Setup},
|
||||||
{1, Handler::Done},
|
{1, Handler::Done},
|
||||||
@@ -1419,7 +1419,7 @@ void tst_Tasking::testTree_data()
|
|||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(3),
|
groupSetup(3),
|
||||||
createDynamicTask(3, TaskAction::StopWithDone)
|
createDynamicTask(3, SetupResult::StopWithDone)
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(4),
|
groupSetup(4),
|
||||||
@@ -1463,7 +1463,7 @@ void tst_Tasking::testTree_data()
|
|||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(3),
|
groupSetup(3),
|
||||||
createDynamicTask(3, TaskAction::StopWithError)
|
createDynamicTask(3, SetupResult::StopWithError)
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(4),
|
groupSetup(4),
|
||||||
@@ -1502,7 +1502,7 @@ void tst_Tasking::testTree_data()
|
|||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(3),
|
groupSetup(3),
|
||||||
createDynamicTask(3, TaskAction::StopWithError)
|
createDynamicTask(3, SetupResult::StopWithError)
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(4),
|
groupSetup(4),
|
||||||
@@ -1547,7 +1547,7 @@ void tst_Tasking::testTree_data()
|
|||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(3),
|
groupSetup(3),
|
||||||
createDynamicTask(3, TaskAction::StopWithError)
|
createDynamicTask(3, SetupResult::StopWithError)
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(4),
|
groupSetup(4),
|
||||||
@@ -1644,7 +1644,7 @@ void tst_Tasking::testTree_data()
|
|||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(3),
|
groupSetup(3),
|
||||||
Group { createDynamicTask(3, TaskAction::StopWithDone) }
|
Group { createDynamicTask(3, SetupResult::StopWithDone) }
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(4),
|
groupSetup(4),
|
||||||
@@ -1689,7 +1689,7 @@ void tst_Tasking::testTree_data()
|
|||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(3),
|
groupSetup(3),
|
||||||
Group { createDynamicTask(3, TaskAction::StopWithError) }
|
Group { createDynamicTask(3, SetupResult::StopWithError) }
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
groupSetup(4),
|
groupSetup(4),
|
||||||
|
|||||||
Reference in New Issue
Block a user