forked from qt-creator/qt-creator
TaskTree: Remove GroupConfig / GroupAction
Use TaskAction for dynamic group setup. Get rid of possibility of selecting group's children to be started inside group setup. Use dynamic children's setup instead, so that each individual child may decide itself whether it wants to be started or not. Change-Id: Ie31f707791db0dc26be92663ca6238b8e49c3b98 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -122,25 +122,24 @@ TaskItem clangToolTask(const AnalyzeInputData &input,
|
||||
};
|
||||
|
||||
const auto onGroupSetup = [=] {
|
||||
const GroupConfig error = GroupConfig{GroupAction::StopWithError};
|
||||
if (setupHandler && !setupHandler())
|
||||
return error;
|
||||
return TaskAction::StopWithError;
|
||||
|
||||
ClangToolStorage *data = storage.activeStorage();
|
||||
data->name = clangToolName(input.tool);
|
||||
data->executable = toolExecutable(input.tool);
|
||||
if (!data->executable.isExecutableFile()) {
|
||||
qWarning() << "Can't start:" << data->executable << "as" << data->name;
|
||||
return error;
|
||||
return TaskAction::StopWithError;
|
||||
}
|
||||
|
||||
QTC_CHECK(!input.unit.arguments.contains(QLatin1String("-o")));
|
||||
QTC_CHECK(!input.unit.arguments.contains(input.unit.file));
|
||||
QTC_ASSERT(FilePath::fromString(input.unit.file).exists(), return error);
|
||||
QTC_ASSERT(FilePath::fromString(input.unit.file).exists(), return TaskAction::StopWithError);
|
||||
data->outputFilePath = createOutputFilePath(input.outputDirPath, input.unit.file);
|
||||
QTC_ASSERT(!data->outputFilePath.isEmpty(), return error);
|
||||
QTC_ASSERT(!data->outputFilePath.isEmpty(), return TaskAction::StopWithError);
|
||||
|
||||
return GroupConfig{GroupAction::ContinueAll};
|
||||
return TaskAction::Continue;
|
||||
};
|
||||
const auto onProcessSetup = [=](QtcProcess &process) {
|
||||
process.setEnvironment(input.environment);
|
||||
|
||||
Reference in New Issue
Block a user