TaskTree: Rename workflow policies

Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

This addresses the 26th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: Icc882710dc4896626dc9332440aa13a692af54c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-11-04 12:44:19 +01:00
parent 273518c82f
commit 2c0a59384c
19 changed files with 133 additions and 133 deletions

View File

@@ -234,7 +234,7 @@ private:
\code \code
const Group group { const Group group {
finishAllAndDone, finishAllAndSuccess,
NetworkQueryTask(...), NetworkQueryTask(...),
Group { Group {
NetworkQueryTask(...), NetworkQueryTask(...),
@@ -311,7 +311,7 @@ private:
\code \code
const Group group { const Group group {
finishAllAndDone, finishAllAndSuccess,
NetworkQueryTask(...), NetworkQueryTask(...),
Group { Group {
NetworkQueryTask(...), NetworkQueryTask(...),
@@ -484,14 +484,14 @@ private:
afterwards, even when some other tasks in the group finished with success. afterwards, even when some other tasks in the group finished with success.
If all child tasks finish successfully, the group finishes with success. If all child tasks finish successfully, the group finishes with success.
If a group is empty, it finishes with success. If a group is empty, it finishes with success.
\value StopOnDone \value StopOnSuccess
Corresponds to the stopOnDone global element. Corresponds to the stopOnSuccess global element.
If any child task finishes with success, the group stops and finishes with success. If any child task finishes with success, the group stops and finishes with success.
If all child tasks finished with an error, the group finishes with an error. If all child tasks finished with an error, the group finishes with an error.
If a group is empty, it finishes with an error. If a group is empty, it finishes with an error.
\value ContinueOnDone \value ContinueOnSuccess
Corresponds to the continueOnDone global element. Corresponds to the continueOnSuccess global element.
Similar to stopOnDone, but in case any child finishes successfully, Similar to stopOnSuccess, but in case any child finishes successfully,
the execution continues until all tasks finish, and the group reports success the execution continues until all tasks finish, and the group reports success
afterwards, even when some other tasks in the group finished with an error. afterwards, even when some other tasks in the group finished with an error.
If all child tasks finish with an error, the group finishes with an error. If all child tasks finish with an error, the group finishes with an error.
@@ -504,8 +504,8 @@ private:
In sequential mode, only the first task is started, and when finished, In sequential mode, only the first task is started, and when finished,
the group finishes too, so the other tasks are always skipped. the group finishes too, so the other tasks are always skipped.
If a group is empty, it finishes with an error. If a group is empty, it finishes with an error.
\value FinishAllAndDone \value FinishAllAndSuccess
Corresponds to the finishAllAndDone global element. Corresponds to the finishAllAndSuccess global element.
The group executes all tasks and ignores their return results. When all The group executes all tasks and ignores their return results. When all
tasks finished, the group finishes with success. tasks finished, the group finishes with success.
If a group is empty, it finishes with success. If a group is empty, it finishes with success.
@@ -516,7 +516,7 @@ private:
If a group is empty, it finishes with an error. If a group is empty, it finishes with an error.
Whenever a child task's result causes the Group to stop, Whenever a child task's result causes the Group to stop,
i.e. in case of StopOnError, StopOnDone, or StopOnFinished policies, i.e. in case of StopOnError, StopOnSuccess, or StopOnFinished policies,
the Group stops the other running child tasks (if any - for example in parallel mode), the Group stops the other running child tasks (if any - for example in parallel mode),
and skips executing tasks it has not started yet (for example, in the sequential mode - and skips executing tasks it has not started yet (for example, in the sequential mode -
those, that are placed after the failed task). Both stopping and skipping child tasks those, that are placed after the failed task). Both stopping and skipping child tasks
@@ -541,12 +541,12 @@ private:
\li An error when at least one child task failed, success otherwise \li An error when at least one child task failed, success otherwise
\li Success \li Success
\row \row
\li StopOnDone \li StopOnSuccess
\li Stops when any child task finished with success and reports success \li Stops when any child task finished with success and reports success
\li Success when at least one child task succeeded, an error otherwise \li Success when at least one child task succeeded, an error otherwise
\li An error \li An error
\row \row
\li ContinueOnDone \li ContinueOnSuccess
\li Yes \li Yes
\li Success when at least one child task succeeded, an error otherwise \li Success when at least one child task succeeded, an error otherwise
\li An error \li An error
@@ -556,7 +556,7 @@ private:
\li Success or an error, depending on the finished child task's result \li Success or an error, depending on the finished child task's result
\li An error \li An error
\row \row
\li FinishAllAndDone \li FinishAllAndSuccess
\li Yes \li Yes
\li Success \li Success
\li Success \li Success
@@ -569,7 +569,7 @@ private:
If a child of a group is also a group, the child group runs its tasks according to its own If a child of a group is also a group, the child group runs its tasks according to its own
workflow policy. When a parent group stops the running child group because workflow policy. When a parent group stops the running child group because
of parent group's workflow policy, i.e. when the StopOnError, StopOnDone, or StopOnFinished of parent group's workflow policy, i.e. when the StopOnError, StopOnSuccess, or StopOnFinished
policy was used for the parent, the child group's result is reported according to the policy was used for the parent, the child group's result is reported according to the
\b Result column and to the \b {child group's workflow policy} row in the table above. \b Result column and to the \b {child group's workflow policy} row in the table above.
*/ */
@@ -613,13 +613,13 @@ private:
*/ */
/*! /*!
\variable stopOnDone \variable stopOnSuccess
A convenient global group's element describing the StopOnDone workflow policy. A convenient global group's element describing the StopOnSuccess workflow policy.
*/ */
/*! /*!
\variable continueOnDone \variable continueOnSuccess
A convenient global group's element describing the ContinueOnDone workflow policy. A convenient global group's element describing the ContinueOnSuccess workflow policy.
*/ */
/*! /*!
@@ -628,8 +628,8 @@ private:
*/ */
/*! /*!
\variable finishAllAndDone \variable finishAllAndSuccess
A convenient global group's element describing the FinishAllAndDone workflow policy. A convenient global group's element describing the FinishAllAndSuccess workflow policy.
*/ */
/*! /*!
@@ -734,7 +734,7 @@ private:
Constructs a group's element holding the group done handler. Constructs a group's element holding the group done handler.
The \a handler is invoked whenever the group finishes with success. The \a handler is invoked whenever the group finishes with success.
Depending on the group's workflow policy, this handler may also be called Depending on the group's workflow policy, this handler may also be called
when the running group is stopped (e.g. when finishAllAndDone element was used). when the running group is stopped (e.g. when finishAllAndSuccess element was used).
When the \a handler is invoked, all of the group's child tasks are already finished. When the \a handler is invoked, all of the group's child tasks are already finished.
@@ -813,8 +813,8 @@ GroupItem parallelLimit(int limit)
For convenience, global elements may be used instead. For convenience, global elements may be used instead.
\sa stopOnError, continueOnError, stopOnDone, continueOnDone, stopOnFinished, finishAllAndDone, \sa stopOnError, continueOnError, stopOnSuccess, continueOnSuccess, stopOnFinished,
finishAllAndError, WorkflowPolicy finishAllAndSuccess, finishAllAndError, WorkflowPolicy
*/ */
GroupItem workflowPolicy(WorkflowPolicy policy) GroupItem workflowPolicy(WorkflowPolicy policy)
{ {
@@ -826,10 +826,10 @@ const GroupItem parallel = parallelLimit(0);
const GroupItem stopOnError = workflowPolicy(WorkflowPolicy::StopOnError); const GroupItem stopOnError = workflowPolicy(WorkflowPolicy::StopOnError);
const GroupItem continueOnError = workflowPolicy(WorkflowPolicy::ContinueOnError); const GroupItem continueOnError = workflowPolicy(WorkflowPolicy::ContinueOnError);
const GroupItem stopOnDone = workflowPolicy(WorkflowPolicy::StopOnDone); const GroupItem stopOnSuccess = workflowPolicy(WorkflowPolicy::StopOnSuccess);
const GroupItem continueOnDone = workflowPolicy(WorkflowPolicy::ContinueOnDone); const GroupItem continueOnSuccess = workflowPolicy(WorkflowPolicy::ContinueOnSuccess);
const GroupItem stopOnFinished = workflowPolicy(WorkflowPolicy::StopOnFinished); const GroupItem stopOnFinished = workflowPolicy(WorkflowPolicy::StopOnFinished);
const GroupItem finishAllAndDone = workflowPolicy(WorkflowPolicy::FinishAllAndDone); const GroupItem finishAllAndSuccess = workflowPolicy(WorkflowPolicy::FinishAllAndSuccess);
const GroupItem finishAllAndError = workflowPolicy(WorkflowPolicy::FinishAllAndError); const GroupItem finishAllAndError = workflowPolicy(WorkflowPolicy::FinishAllAndError);
static SetupResult toSetupResult(bool success) static SetupResult toSetupResult(bool success)
@@ -1251,10 +1251,10 @@ static bool initialSuccessBit(WorkflowPolicy workflowPolicy)
switch (workflowPolicy) { switch (workflowPolicy) {
case WorkflowPolicy::StopOnError: case WorkflowPolicy::StopOnError:
case WorkflowPolicy::ContinueOnError: case WorkflowPolicy::ContinueOnError:
case WorkflowPolicy::FinishAllAndDone: case WorkflowPolicy::FinishAllAndSuccess:
return true; return true;
case WorkflowPolicy::StopOnDone: case WorkflowPolicy::StopOnSuccess:
case WorkflowPolicy::ContinueOnDone: case WorkflowPolicy::ContinueOnSuccess:
case WorkflowPolicy::StopOnFinished: case WorkflowPolicy::StopOnFinished:
case WorkflowPolicy::FinishAllAndError: case WorkflowPolicy::FinishAllAndError:
return false; return false;
@@ -1280,7 +1280,7 @@ TaskContainer::RuntimeData::~RuntimeData()
bool TaskContainer::RuntimeData::updateSuccessBit(bool success) bool TaskContainer::RuntimeData::updateSuccessBit(bool success)
{ {
if (m_constData.m_workflowPolicy == WorkflowPolicy::FinishAllAndDone if (m_constData.m_workflowPolicy == WorkflowPolicy::FinishAllAndSuccess
|| m_constData.m_workflowPolicy == WorkflowPolicy::FinishAllAndError || m_constData.m_workflowPolicy == WorkflowPolicy::FinishAllAndError
|| m_constData.m_workflowPolicy == WorkflowPolicy::StopOnFinished) { || m_constData.m_workflowPolicy == WorkflowPolicy::StopOnFinished) {
if (m_constData.m_workflowPolicy == WorkflowPolicy::StopOnFinished) if (m_constData.m_workflowPolicy == WorkflowPolicy::StopOnFinished)
@@ -1288,8 +1288,8 @@ bool TaskContainer::RuntimeData::updateSuccessBit(bool success)
return m_successBit; return m_successBit;
} }
const bool donePolicy = m_constData.m_workflowPolicy == WorkflowPolicy::StopOnDone const bool donePolicy = m_constData.m_workflowPolicy == WorkflowPolicy::StopOnSuccess
|| m_constData.m_workflowPolicy == WorkflowPolicy::ContinueOnDone; || m_constData.m_workflowPolicy == WorkflowPolicy::ContinueOnSuccess;
m_successBit = donePolicy ? (m_successBit || success) : (m_successBit && success); m_successBit = donePolicy ? (m_successBit || success) : (m_successBit && success);
return m_successBit; return m_successBit;
} }
@@ -1373,7 +1373,7 @@ 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()
const bool shouldStop = m_constData.m_workflowPolicy == WorkflowPolicy::StopOnFinished const bool shouldStop = m_constData.m_workflowPolicy == WorkflowPolicy::StopOnFinished
|| (m_constData.m_workflowPolicy == WorkflowPolicy::StopOnDone && success) || (m_constData.m_workflowPolicy == WorkflowPolicy::StopOnSuccess && success)
|| (m_constData.m_workflowPolicy == WorkflowPolicy::StopOnError && !success); || (m_constData.m_workflowPolicy == WorkflowPolicy::StopOnError && !success);
if (shouldStop) if (shouldStop)
stop(); stop();

View File

@@ -101,26 +101,26 @@ private:
}; };
// WorkflowPolicy: // WorkflowPolicy:
// 1. When all children finished with done -> report done, otherwise: // 1. When all children finished with success -> report success, otherwise:
// a) Report error on first error and stop executing other children (including their subtree). // a) Report error on first error and stop executing other children (including their subtree).
// b) On first error - continue executing all children and report error afterwards. // b) On first error - continue executing all children and report error afterwards.
// 2. When all children finished with error -> report error, otherwise: // 2. When all children finished with error -> report error, otherwise:
// a) Report done on first done and stop executing other children (including their subtree). // a) Report success on first success and stop executing other children (including their subtree).
// b) On first done - continue executing all children and report done afterwards. // b) On first success - continue executing all children and report success afterwards.
// 3. Stops on first finished child. In sequential mode it will never run other children then the first one. // 3. Stops on first finished child. In sequential mode it will never run other children then the first one.
// Useful only in parallel mode. // Useful only in parallel mode.
// 4. Always run all children, let them finish, ignore their results and report done afterwards. // 4. Always run all children, let them finish, ignore their results and report success afterwards.
// 5. Always run all children, let them finish, ignore their results and report error afterwards. // 5. Always run all children, let them finish, ignore their results and report error afterwards.
enum class WorkflowPolicy enum class WorkflowPolicy
{ {
StopOnError, // 1a - Reports error on first child error, otherwise done (if all children were done). StopOnError, // 1a - Reports error on first child error, otherwise success (if all children were success).
ContinueOnError, // 1b - The same, but children execution continues. Reports done when no children. ContinueOnError, // 1b - The same, but children execution continues. Reports success when no children.
StopOnDone, // 2a - Reports done on first child done, otherwise error (if all children were error). StopOnSuccess, // 2a - Reports success on first child success, otherwise error (if all children were error).
ContinueOnDone, // 2b - The same, but children execution continues. Reports error when no children. ContinueOnSuccess, // 2b - The same, but children execution continues. Reports error when no children.
StopOnFinished, // 3 - Stops on first finished child and report its result. StopOnFinished, // 3 - Stops on first finished child and report its result.
FinishAllAndDone, // 4 - Reports done after all children finished. FinishAllAndSuccess, // 4 - Reports success after all children finished.
FinishAllAndError // 5 - Reports error after all children finished. FinishAllAndError // 5 - Reports error after all children finished.
}; };
Q_ENUM_NS(WorkflowPolicy); Q_ENUM_NS(WorkflowPolicy);
@@ -322,10 +322,10 @@ TASKING_EXPORT extern const GroupItem parallel;
TASKING_EXPORT extern const GroupItem stopOnError; TASKING_EXPORT extern const GroupItem stopOnError;
TASKING_EXPORT extern const GroupItem continueOnError; TASKING_EXPORT extern const GroupItem continueOnError;
TASKING_EXPORT extern const GroupItem stopOnDone; TASKING_EXPORT extern const GroupItem stopOnSuccess;
TASKING_EXPORT extern const GroupItem continueOnDone; TASKING_EXPORT extern const GroupItem continueOnSuccess;
TASKING_EXPORT extern const GroupItem stopOnFinished; TASKING_EXPORT extern const GroupItem stopOnFinished;
TASKING_EXPORT extern const GroupItem finishAllAndDone; TASKING_EXPORT extern const GroupItem finishAllAndSuccess;
TASKING_EXPORT extern const GroupItem finishAllAndError; TASKING_EXPORT extern const GroupItem finishAllAndError;
class TASKING_EXPORT Storage final : public GroupItem class TASKING_EXPORT Storage final : public GroupItem

View File

@@ -347,7 +347,7 @@ void TestRunner::runTestsHelper()
std::unique_ptr<TestOutputReader> m_outputReader; std::unique_ptr<TestOutputReader> m_outputReader;
}; };
QList<GroupItem> tasks{finishAllAndDone}; QList<GroupItem> tasks{finishAllAndSuccess};
for (ITestConfiguration *config : m_selectedTests) { for (ITestConfiguration *config : m_selectedTests) {
QTC_ASSERT(config, continue); QTC_ASSERT(config, continue);
@@ -445,7 +445,7 @@ void TestRunner::runTestsHelper()
} }
}; };
const Group group { const Group group {
finishAllAndDone, finishAllAndSuccess,
Tasking::Storage(storage), Tasking::Storage(storage),
onGroupSetup(onSetup), onGroupSetup(onSetup),
ProcessTask(onProcessSetup, onProcessDone) ProcessTask(onProcessSetup, onProcessDone)

View File

@@ -218,7 +218,7 @@ GroupItem clangToolTask(const AnalyzeInputData &input,
}; };
const Group group { const Group group {
finishAllAndDone, finishAllAndSuccess,
Tasking::Storage(storage), Tasking::Storage(storage),
onGroupSetup(onSetup), onGroupSetup(onSetup),
Group { Group {

View File

@@ -215,7 +215,7 @@ void DocumentClangToolRunner::run()
return !m_document->isModified() || isVFSOverlaySupported(executable); return !m_document->isModified() || isVFSOverlaySupported(executable);
}; };
const auto outputHandler = [this](const AnalyzeOutputData &output) { onDone(output); }; const auto outputHandler = [this](const AnalyzeOutputData &output) { onDone(output); };
tasks.append(Group{finishAllAndDone, clangToolTask(input, setupHandler, outputHandler)}); tasks.append(Group{finishAllAndSuccess, clangToolTask(input, setupHandler, outputHandler)});
}; };
addClangTool(ClangToolType::Tidy); addClangTool(ClangToolType::Tidy);
addClangTool(ClangToolType::Clazy); addClangTool(ClangToolType::Clazy);

View File

@@ -370,7 +370,7 @@ GroupItem CMakeBuildStep::runRecipe()
OutputFormat::ErrorMessage); OutputFormat::ErrorMessage);
}; };
Group root { Group root {
ignoreReturnValue() ? finishAllAndDone : stopOnError, ignoreReturnValue() ? finishAllAndSuccess : stopOnError,
ProjectParserTask(onParserSetup, onParserError, CallDoneIf::Error), ProjectParserTask(onParserSetup, onParserError, CallDoneIf::Error),
defaultProcessTask(), defaultProcessTask(),
onGroupDone([this] { updateDeploymentData(); }) onGroupDone([this] { updateDeploymentData(); })

View File

@@ -461,7 +461,7 @@ void LocatorMatcher::start()
for (const LocatorMatcherTask &task : std::as_const(d->m_tasks)) { for (const LocatorMatcherTask &task : std::as_const(d->m_tasks)) {
const auto storage = task.storage; const auto storage = task.storage;
const Group group { const Group group {
finishAllAndDone, finishAllAndSuccess,
Storage(storage), Storage(storage),
onGroupSetup(onSetup(storage, index)), onGroupSetup(onSetup(storage, index)),
onGroupDone([storage] { storage->finalize(); }), onGroupDone([storage] { storage->finalize(); }),

View File

@@ -388,7 +388,7 @@ void Locator::refresh(const QList<ILocatorFilter *> &filters)
continue; continue;
const Group group { const Group group {
finishAllAndDone, finishAllAndSuccess,
*task, *task,
onGroupDone([this, filter] { m_refreshingFilters.removeOne(filter); }, CallDoneIf::Success) onGroupDone([this, filter] { m_refreshingFilters.removeOne(filter); }, CallDoneIf::Success)
}; };

View File

@@ -116,7 +116,7 @@ DiffFilesController::DiffFilesController(IDocument *document)
const QList<ReloadInput> inputList = reloadInputList(); const QList<ReloadInput> inputList = reloadInputList();
outputList->resize(inputList.size()); outputList->resize(inputList.size());
QList<GroupItem> tasks { parallel, finishAllAndDone }; QList<GroupItem> tasks { parallel, finishAllAndSuccess };
for (int i = 0; i < inputList.size(); ++i) { for (int i = 0; i < inputList.size(); ++i) {
const auto onDiffSetup = [this, reloadInput = inputList.at(i)](Async<FileData> &async) { const auto onDiffSetup = [this, reloadInput = inputList.at(i)](Async<FileData> &async) {
async.setConcurrentCallData( async.setConcurrentCallData(

View File

@@ -337,7 +337,7 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
Tasking::Storage(diffInputStorage), Tasking::Storage(diffInputStorage),
Group { Group {
parallel, parallel,
continueOnDone, continueOnSuccess,
ProcessTask(onStagedSetup, onStagedDone, CallDoneIf::Success), ProcessTask(onStagedSetup, onStagedDone, CallDoneIf::Success),
ProcessTask(onUnstagedSetup, onUnstagedDone, CallDoneIf::Success), ProcessTask(onUnstagedSetup, onUnstagedDone, CallDoneIf::Success),
onGroupDone(onDone, CallDoneIf::Success) onGroupDone(onDone, CallDoneIf::Success)
@@ -500,7 +500,7 @@ ShowController::ShowController(IDocument *document, const QString &id)
QList<GroupItem> tasks { QList<GroupItem> tasks {
parallel, parallel,
continueOnDone, continueOnSuccess,
onGroupDone(onFollowsError, CallDoneIf::Error) onGroupDone(onFollowsError, CallDoneIf::Error)
}; };
for (int i = 0, total = parents.size(); i < total; ++i) { for (int i = 0, total = parents.size(); i < total; ++i) {
@@ -532,11 +532,11 @@ ShowController::ShowController(IDocument *document, const QString &id)
parallel, parallel,
onGroupSetup([this] { setStartupFile(VcsBase::source(this->document()).toString()); }), onGroupSetup([this] { setStartupFile(VcsBase::source(this->document()).toString()); }),
Group { Group {
finishAllAndDone, finishAllAndSuccess,
ProcessTask(onDescriptionSetup, onDescriptionDone, CallDoneIf::Success), ProcessTask(onDescriptionSetup, onDescriptionDone, CallDoneIf::Success),
Group { Group {
parallel, parallel,
finishAllAndDone, finishAllAndSuccess,
onGroupSetup(desciptionDetailsSetup), onGroupSetup(desciptionDetailsSetup),
ProcessTask(onBranchesSetup, onBranchesDone, CallDoneIf::Success), ProcessTask(onBranchesSetup, onBranchesDone, CallDoneIf::Success),
ProcessTask(onPrecedesSetup, onPrecedesDone, CallDoneIf::Success), ProcessTask(onPrecedesSetup, onPrecedesDone, CallDoneIf::Success),

View File

@@ -283,7 +283,7 @@ void AbstractProcessStep::setDisplayedParameters(ProcessParameters *params)
GroupItem AbstractProcessStep::runRecipe() GroupItem AbstractProcessStep::runRecipe()
{ {
return Group { ignoreReturnValue() ? finishAllAndDone : stopOnError, defaultProcessTask() }; return Group { ignoreReturnValue() ? finishAllAndSuccess : stopOnError, defaultProcessTask() };
} }
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -227,7 +227,7 @@ Tasking::GroupItem QmakeMakeStep::runRecipe()
}; };
return Group { return Group {
ignoreReturnValue() ? finishAllAndDone : stopOnError, ignoreReturnValue() ? finishAllAndSuccess : stopOnError,
onGroupSetup(onSetup), onGroupSetup(onSetup),
onGroupDone(onError, CallDoneIf::Error), onGroupDone(onError, CallDoneIf::Error),
defaultProcessTask() defaultProcessTask()

View File

@@ -223,7 +223,7 @@ GroupItem QnxDeployQtLibrariesDialogPrivate::chmodTree()
if (file.isExecutable()) if (file.isExecutable())
filesToChmod << file; filesToChmod << file;
} }
QList<GroupItem> chmodList{finishAllAndDone, parallelLimit(MaxConcurrentStatCalls)}; QList<GroupItem> chmodList{finishAllAndSuccess, parallelLimit(MaxConcurrentStatCalls)};
for (const DeployableFile &file : std::as_const(filesToChmod)) { for (const DeployableFile &file : std::as_const(filesToChmod)) {
QTC_ASSERT(file.isValid(), continue); QTC_ASSERT(file.isValid(), continue);
chmodList.append(chmodTask(file)); chmodList.append(chmodTask(file));
@@ -263,7 +263,7 @@ Group QnxDeployQtLibrariesDialogPrivate::deployRecipe()
const Group root { const Group root {
onGroupSetup(setupHandler), onGroupSetup(setupHandler),
Group { Group {
finishAllAndDone, finishAllAndSuccess,
checkDirTask() checkDirTask()
}, },
Group { Group {

View File

@@ -154,7 +154,7 @@ GroupItem GenericDirectUploadStep::statTree(const TreeStorage<UploadStorage> &st
const auto onSetup = [this, storage, filesToStat, statEndHandler](TaskTree &tree) { const auto onSetup = [this, storage, filesToStat, statEndHandler](TaskTree &tree) {
UploadStorage *storagePtr = storage.activeStorage(); UploadStorage *storagePtr = storage.activeStorage();
const QList<DeployableFile> files = filesToStat(storagePtr); const QList<DeployableFile> files = filesToStat(storagePtr);
QList<GroupItem> statList{finishAllAndDone, parallelLimit(MaxConcurrentStatCalls)}; QList<GroupItem> statList{finishAllAndSuccess, parallelLimit(MaxConcurrentStatCalls)};
for (const DeployableFile &file : std::as_const(files)) { for (const DeployableFile &file : std::as_const(files)) {
QTC_ASSERT(file.isValid(), continue); QTC_ASSERT(file.isValid(), continue);
statList.append(statTask(storagePtr, file, statEndHandler)); statList.append(statTask(storagePtr, file, statEndHandler));
@@ -231,7 +231,7 @@ GroupItem GenericDirectUploadStep::chmodTree(const TreeStorage<UploadStorage> &s
if (file.isExecutable()) if (file.isExecutable())
filesToChmod << file; filesToChmod << file;
} }
QList<GroupItem> chmodList{finishAllAndDone, parallelLimit(MaxConcurrentStatCalls)}; QList<GroupItem> chmodList{finishAllAndSuccess, parallelLimit(MaxConcurrentStatCalls)};
for (const DeployableFile &file : std::as_const(filesToChmod)) { for (const DeployableFile &file : std::as_const(filesToChmod)) {
QTC_ASSERT(file.isValid(), continue); QTC_ASSERT(file.isValid(), continue);
chmodList.append(chmodTask(file)); chmodList.append(chmodTask(file));

View File

@@ -135,7 +135,7 @@ GroupItem GenericLinuxDeviceTesterPrivate::unameTask() const
emit q->errorMessage(Tr::tr("uname failed.") + '\n'); emit q->errorMessage(Tr::tr("uname failed.") + '\n');
}; };
return Group { return Group {
finishAllAndDone, finishAllAndSuccess,
ProcessTask(onSetup, onDone) ProcessTask(onSetup, onDone)
}; };
} }
@@ -162,7 +162,7 @@ GroupItem GenericLinuxDeviceTesterPrivate::gathererTask() const
}; };
return Group { return Group {
finishAllAndDone, finishAllAndSuccess,
DeviceUsedPortsGathererTask(onSetup, onDone) DeviceUsedPortsGathererTask(onSetup, onDone)
}; };
} }
@@ -228,7 +228,7 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTasks() const
{ {
TreeStorage<TransferStorage> storage; TreeStorage<TransferStorage> storage;
return Group { return Group {
continueOnDone, continueOnSuccess,
Tasking::Storage(storage), Tasking::Storage(storage),
transferTask(FileTransferMethod::GenericCopy, storage), transferTask(FileTransferMethod::GenericCopy, storage),
transferTask(FileTransferMethod::Sftp, storage), transferTask(FileTransferMethod::Sftp, storage),

View File

@@ -201,7 +201,7 @@ SubversionDiffEditorController::SubversionDiffEditorController(IDocument *docume
Tasking::Storage(diffInputStorage), Tasking::Storage(diffInputStorage),
parallel, parallel,
Group { Group {
finishAllAndDone, finishAllAndSuccess,
ProcessTask(onDescriptionSetup, onDescriptionDone) ProcessTask(onDescriptionSetup, onDescriptionDone)
}, },
Group { Group {

View File

@@ -344,18 +344,18 @@ void tst_Tasking::testTree_data()
QTest::newRow("DoneAndStopOnError") << doneData(WorkflowPolicy::StopOnError); QTest::newRow("DoneAndStopOnError") << doneData(WorkflowPolicy::StopOnError);
QTest::newRow("DoneAndContinueOnError") << doneData(WorkflowPolicy::ContinueOnError); QTest::newRow("DoneAndContinueOnError") << doneData(WorkflowPolicy::ContinueOnError);
QTest::newRow("DoneAndStopOnDone") << doneData(WorkflowPolicy::StopOnDone); QTest::newRow("DoneAndStopOnSuccess") << doneData(WorkflowPolicy::StopOnSuccess);
QTest::newRow("DoneAndContinueOnDone") << doneData(WorkflowPolicy::ContinueOnDone); QTest::newRow("DoneAndContinueOnSuccess") << doneData(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("DoneAndStopOnFinished") << doneData(WorkflowPolicy::StopOnFinished); QTest::newRow("DoneAndStopOnFinished") << doneData(WorkflowPolicy::StopOnFinished);
QTest::newRow("DoneAndFinishAllAndDone") << doneData(WorkflowPolicy::FinishAllAndDone); QTest::newRow("DoneAndFinishAllAndSuccess") << doneData(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("DoneAndFinishAllAndError") << doneData(WorkflowPolicy::FinishAllAndError); QTest::newRow("DoneAndFinishAllAndError") << doneData(WorkflowPolicy::FinishAllAndError);
QTest::newRow("ErrorAndStopOnError") << errorData(WorkflowPolicy::StopOnError); QTest::newRow("ErrorAndStopOnError") << errorData(WorkflowPolicy::StopOnError);
QTest::newRow("ErrorAndContinueOnError") << errorData(WorkflowPolicy::ContinueOnError); QTest::newRow("ErrorAndContinueOnError") << errorData(WorkflowPolicy::ContinueOnError);
QTest::newRow("ErrorAndStopOnDone") << errorData(WorkflowPolicy::StopOnDone); QTest::newRow("ErrorAndStopOnSuccess") << errorData(WorkflowPolicy::StopOnSuccess);
QTest::newRow("ErrorAndContinueOnDone") << errorData(WorkflowPolicy::ContinueOnDone); QTest::newRow("ErrorAndContinueOnSuccess") << errorData(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("ErrorAndStopOnFinished") << errorData(WorkflowPolicy::StopOnFinished); QTest::newRow("ErrorAndStopOnFinished") << errorData(WorkflowPolicy::StopOnFinished);
QTest::newRow("ErrorAndFinishAllAndDone") << errorData(WorkflowPolicy::FinishAllAndDone); QTest::newRow("ErrorAndFinishAllAndSuccess") << errorData(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("ErrorAndFinishAllAndError") << errorData(WorkflowPolicy::FinishAllAndError); QTest::newRow("ErrorAndFinishAllAndError") << errorData(WorkflowPolicy::FinishAllAndError);
} }
@@ -681,20 +681,20 @@ void tst_Tasking::testTree_data()
QTest::newRow("EmptyContinueOnError") << TestData{storage, root2, doneLog, 0, QTest::newRow("EmptyContinueOnError") << TestData{storage, root2, doneLog, 0,
OnDone::Success}; OnDone::Success};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("EmptyStopOnDone") << TestData{storage, root3, errorLog, 0, QTest::newRow("EmptyStopOnSuccess") << TestData{storage, root3, errorLog, 0,
OnDone::Failure}; OnDone::Failure};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("EmptyContinueOnDone") << TestData{storage, root4, errorLog, 0, QTest::newRow("EmptyContinueOnSuccess") << TestData{storage, root4, errorLog, 0,
OnDone::Failure}; OnDone::Failure};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
QTest::newRow("EmptyStopOnFinished") << TestData{storage, root5, errorLog, 0, QTest::newRow("EmptyStopOnFinished") << TestData{storage, root5, errorLog, 0,
OnDone::Failure}; OnDone::Failure};
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("EmptyFinishAllAndDone") << TestData{storage, root6, doneLog, 0, QTest::newRow("EmptyFinishAllAndSuccess") << TestData{storage, root6, doneLog, 0,
OnDone::Success}; OnDone::Success};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -733,20 +733,20 @@ void tst_Tasking::testTree_data()
QTest::newRow("DoneContinueOnError") << TestData{storage, root2, doneLog, 1, QTest::newRow("DoneContinueOnError") << TestData{storage, root2, doneLog, 1,
OnDone::Success}; OnDone::Success};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("DoneStopOnDone") << TestData{storage, root3, doneLog, 1, QTest::newRow("DoneStopOnSuccess") << TestData{storage, root3, doneLog, 1,
OnDone::Success}; OnDone::Success};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("DoneContinueOnDone") << TestData{storage, root4, doneLog, 1, QTest::newRow("DoneContinueOnSuccess") << TestData{storage, root4, doneLog, 1,
OnDone::Success}; OnDone::Success};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
QTest::newRow("DoneStopOnFinished") << TestData{storage, root5, doneLog, 1, QTest::newRow("DoneStopOnFinished") << TestData{storage, root5, doneLog, 1,
OnDone::Success}; OnDone::Success};
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("DoneFinishAllAndDone") << TestData{storage, root6, doneLog, 1, QTest::newRow("DoneFinishAllAndSuccess") << TestData{storage, root6, doneLog, 1,
OnDone::Success}; OnDone::Success};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -785,20 +785,20 @@ void tst_Tasking::testTree_data()
QTest::newRow("ErrorContinueOnError") << TestData{storage, root2, errorLog, 1, QTest::newRow("ErrorContinueOnError") << TestData{storage, root2, errorLog, 1,
OnDone::Failure}; OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("ErrorStopOnDone") << TestData{storage, root3, errorLog, 1, QTest::newRow("ErrorStopOnSuccess") << TestData{storage, root3, errorLog, 1,
OnDone::Failure}; OnDone::Failure};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("ErrorContinueOnDone") << TestData{storage, root4, errorLog, 1, QTest::newRow("ErrorContinueOnSuccess") << TestData{storage, root4, errorLog, 1,
OnDone::Failure}; OnDone::Failure};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
QTest::newRow("ErrorStopOnFinished") << TestData{storage, root5, errorLog, 1, QTest::newRow("ErrorStopOnFinished") << TestData{storage, root5, errorLog, 1,
OnDone::Failure}; OnDone::Failure};
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("ErrorFinishAllAndDone") << TestData{storage, root6, doneLog, 1, QTest::newRow("ErrorFinishAllAndSuccess") << TestData{storage, root6, doneLog, 1,
OnDone::Success}; OnDone::Success};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -854,20 +854,20 @@ void tst_Tasking::testTree_data()
QTest::newRow("StopRootWithContinueOnError") QTest::newRow("StopRootWithContinueOnError")
<< TestData{storage, root2, errorDoneLog, 2, OnDone::Failure}; << TestData{storage, root2, errorDoneLog, 2, OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("StopRootWithStopOnDone") QTest::newRow("StopRootWithStopOnSuccess")
<< TestData{storage, root3, doneLog, 2, OnDone::Success}; << TestData{storage, root3, doneLog, 2, OnDone::Success};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("StopRootWithContinueOnDone") QTest::newRow("StopRootWithContinueOnSuccess")
<< TestData{storage, root4, doneLog, 2, OnDone::Success}; << TestData{storage, root4, doneLog, 2, OnDone::Success};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
QTest::newRow("StopRootWithStopOnFinished") QTest::newRow("StopRootWithStopOnFinished")
<< TestData{storage, root5, errorErrorLog, 2, OnDone::Failure}; << TestData{storage, root5, errorErrorLog, 2, OnDone::Failure};
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("StopRootWithFinishAllAndDone") QTest::newRow("StopRootWithFinishAllAndSuccess")
<< TestData{storage, root6, doneLog, 2, OnDone::Success}; << TestData{storage, root6, doneLog, 2, OnDone::Success};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -941,20 +941,20 @@ void tst_Tasking::testTree_data()
QTest::newRow("StopRootAfterDoneWithContinueOnError") QTest::newRow("StopRootAfterDoneWithContinueOnError")
<< TestData{storage, root2, errorDoneLog, 3, OnDone::Failure}; << TestData{storage, root2, errorDoneLog, 3, OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("StopRootAfterDoneWithStopOnDone") QTest::newRow("StopRootAfterDoneWithStopOnSuccess")
<< TestData{storage, root3, doneErrorLog, 3, OnDone::Success}; << TestData{storage, root3, doneErrorLog, 3, OnDone::Success};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("StopRootAfterDoneWithContinueOnDone") QTest::newRow("StopRootAfterDoneWithContinueOnSuccess")
<< TestData{storage, root4, doneDoneLog, 3, OnDone::Success}; << TestData{storage, root4, doneDoneLog, 3, OnDone::Success};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
QTest::newRow("StopRootAfterDoneWithStopOnFinished") QTest::newRow("StopRootAfterDoneWithStopOnFinished")
<< TestData{storage, root5, doneErrorLog, 3, OnDone::Success}; << TestData{storage, root5, doneErrorLog, 3, OnDone::Success};
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("StopRootAfterDoneWithFinishAllAndDone") QTest::newRow("StopRootAfterDoneWithFinishAllAndSuccess")
<< TestData{storage, root6, doneDoneLog, 3, OnDone::Success}; << TestData{storage, root6, doneDoneLog, 3, OnDone::Success};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -998,12 +998,12 @@ void tst_Tasking::testTree_data()
QTest::newRow("StopGroupWithContinueOnError") QTest::newRow("StopGroupWithContinueOnError")
<< TestData{storage, root2, log, 2, OnDone::Failure}; << TestData{storage, root2, log, 2, OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("StopGroupWithStopOnDone") QTest::newRow("StopGroupWithStopOnSuccess")
<< TestData{storage, root3, log, 2, OnDone::Failure}; << TestData{storage, root3, log, 2, OnDone::Failure};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("StopGroupWithContinueOnDone") QTest::newRow("StopGroupWithContinueOnSuccess")
<< TestData{storage, root4, log, 2, OnDone::Failure}; << TestData{storage, root4, log, 2, OnDone::Failure};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
@@ -1011,9 +1011,9 @@ void tst_Tasking::testTree_data()
<< TestData{storage, root5, log, 2, OnDone::Failure}; << TestData{storage, root5, log, 2, OnDone::Failure};
// TODO: Behavioral change! Fix Docs! // TODO: Behavioral change! Fix Docs!
// Cancellation always invokes error handler (i.e. DoneWith is Cancel) // Cancellation always invokes error handler (i.e. DoneWith is Canceled)
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("StopGroupWithFinishAllAndDone") QTest::newRow("StopGroupWithFinishAllAndSuccess")
<< TestData{storage, root6, log, 2, OnDone::Failure}; << TestData{storage, root6, log, 2, OnDone::Failure};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -1069,13 +1069,13 @@ void tst_Tasking::testTree_data()
QTest::newRow("StopGroupAfterDoneWithContinueOnError") QTest::newRow("StopGroupAfterDoneWithContinueOnError")
<< TestData{storage, root2, errorLog, 3, OnDone::Failure}; << TestData{storage, root2, errorLog, 3, OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("StopGroupAfterDoneWithStopOnDone") QTest::newRow("StopGroupAfterDoneWithStopOnSuccess")
<< TestData{storage, root3, doneLog, 3, OnDone::Failure}; << TestData{storage, root3, doneLog, 3, OnDone::Failure};
// TODO: Behavioral change! // TODO: Behavioral change!
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("StopGroupAfterDoneWithContinueOnDone") QTest::newRow("StopGroupAfterDoneWithContinueOnSuccess")
<< TestData{storage, root4, errorLog, 3, OnDone::Failure}; << TestData{storage, root4, errorLog, 3, OnDone::Failure};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
@@ -1083,8 +1083,8 @@ void tst_Tasking::testTree_data()
<< TestData{storage, root5, doneLog, 3, OnDone::Failure}; << TestData{storage, root5, doneLog, 3, OnDone::Failure};
// TODO: Behavioral change! // TODO: Behavioral change!
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("StopGroupAfterDoneWithFinishAllAndDone") QTest::newRow("StopGroupAfterDoneWithFinishAllAndSuccess")
<< TestData{storage, root6, errorLog, 3, OnDone::Failure}; << TestData{storage, root6, errorLog, 3, OnDone::Failure};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -1140,12 +1140,12 @@ void tst_Tasking::testTree_data()
QTest::newRow("StopGroupAfterErrorWithContinueOnError") QTest::newRow("StopGroupAfterErrorWithContinueOnError")
<< TestData{storage, root2, longLog, 3, OnDone::Failure}; << TestData{storage, root2, longLog, 3, OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
QTest::newRow("StopGroupAfterErrorWithStopOnDone") QTest::newRow("StopGroupAfterErrorWithStopOnSuccess")
<< TestData{storage, root3, longLog, 3, OnDone::Failure}; << TestData{storage, root3, longLog, 3, OnDone::Failure};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
QTest::newRow("StopGroupAfterErrorWithContinueOnDone") QTest::newRow("StopGroupAfterErrorWithContinueOnSuccess")
<< TestData{storage, root4, longLog, 3, OnDone::Failure}; << TestData{storage, root4, longLog, 3, OnDone::Failure};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
@@ -1153,8 +1153,8 @@ void tst_Tasking::testTree_data()
<< TestData{storage, root5, shortLog, 3, OnDone::Failure}; << TestData{storage, root5, shortLog, 3, OnDone::Failure};
// TODO: Behavioral change! // TODO: Behavioral change!
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("StopGroupAfterErrorWithFinishAllAndDone") QTest::newRow("StopGroupAfterErrorWithFinishAllAndSuccess")
<< TestData{storage, root6, longLog, 3, OnDone::Failure}; << TestData{storage, root6, longLog, 3, OnDone::Failure};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
@@ -1197,15 +1197,15 @@ void tst_Tasking::testTree_data()
}; };
QTest::newRow("ContinueOnError") << TestData{storage, root2, errorLog, 3, OnDone::Failure}; QTest::newRow("ContinueOnError") << TestData{storage, root2, errorLog, 3, OnDone::Failure};
const Group root3 = createRoot(WorkflowPolicy::StopOnDone); const Group root3 = createRoot(WorkflowPolicy::StopOnSuccess);
const Log log3 { const Log log3 {
{1, Handler::Setup}, {1, Handler::Setup},
{1, Handler::Success}, {1, Handler::Success},
{0, Handler::GroupSuccess} {0, Handler::GroupSuccess}
}; };
QTest::newRow("StopOnDone") << TestData{storage, root3, log3, 3, OnDone::Success}; QTest::newRow("StopOnSuccess") << TestData{storage, root3, log3, 3, OnDone::Success};
const Group root4 = createRoot(WorkflowPolicy::ContinueOnDone); const Group root4 = createRoot(WorkflowPolicy::ContinueOnSuccess);
const Log doneLog { const Log doneLog {
{1, Handler::Setup}, {1, Handler::Setup},
{1, Handler::Success}, {1, Handler::Success},
@@ -1215,7 +1215,7 @@ void tst_Tasking::testTree_data()
{3, Handler::Success}, {3, Handler::Success},
{0, Handler::GroupSuccess} {0, Handler::GroupSuccess}
}; };
QTest::newRow("ContinueOnDone") << TestData{storage, root4, doneLog, 3, OnDone::Success}; QTest::newRow("ContinueOnSuccess") << TestData{storage, root4, doneLog, 3, OnDone::Success};
const Group root5 = createRoot(WorkflowPolicy::StopOnFinished); const Group root5 = createRoot(WorkflowPolicy::StopOnFinished);
const Log log5 { const Log log5 {
@@ -1225,8 +1225,8 @@ void tst_Tasking::testTree_data()
}; };
QTest::newRow("StopOnFinished") << TestData{storage, root5, log5, 3, OnDone::Success}; QTest::newRow("StopOnFinished") << TestData{storage, root5, log5, 3, OnDone::Success};
const Group root6 = createRoot(WorkflowPolicy::FinishAllAndDone); const Group root6 = createRoot(WorkflowPolicy::FinishAllAndSuccess);
QTest::newRow("FinishAllAndDone") << TestData{storage, root6, doneLog, 3, OnDone::Success}; QTest::newRow("FinishAllAndSuccess") << TestData{storage, root6, doneLog, 3, OnDone::Success};
const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError); const Group root7 = createRoot(WorkflowPolicy::FinishAllAndError);
QTest::newRow("FinishAllAndError") << TestData{storage, root7, errorLog, 3, OnDone::Failure}; QTest::newRow("FinishAllAndError") << TestData{storage, root7, errorLog, 3, OnDone::Failure};

View File

@@ -125,8 +125,8 @@ int main(int argc, char *argv[])
task_4_4->setBusyTime(6); task_4_4->setBusyTime(6);
task_4_4->setBusyTime(3); task_4_4->setBusyTime(3);
groupTask_1->setWorkflowPolicy(WorkflowPolicy::ContinueOnDone); groupTask_1->setWorkflowPolicy(WorkflowPolicy::ContinueOnSuccess);
groupTask_4->setWorkflowPolicy(WorkflowPolicy::FinishAllAndDone); groupTask_4->setWorkflowPolicy(WorkflowPolicy::FinishAllAndSuccess);
groupTask_4_3->setExecuteMode(ExecuteMode::Parallel); groupTask_4_3->setExecuteMode(ExecuteMode::Parallel);
groupTask_4_3->setWorkflowPolicy(WorkflowPolicy::StopOnError); groupTask_4_3->setWorkflowPolicy(WorkflowPolicy::StopOnError);

View File

@@ -65,7 +65,7 @@ void Images::process()
cancelButton->setEnabled(false); cancelButton->setEnabled(false);
}; };
QList<GroupItem> tasks { QList<GroupItem> tasks {
finishAllAndDone, finishAllAndSuccess,
parallel, parallel,
onGroupSetup(onRootSetup), onGroupSetup(onRootSetup),
onGroupDone(onRootDone, CallDoneIf::Success) onGroupDone(onRootDone, CallDoneIf::Success)