ConfigureStep: Employ task tree for running

Task-number: QTCREATORBUG-29168
Change-Id: I54281a6aaead85ca76f804956114e7c6dafeb28c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-07-12 14:51:25 +02:00
parent 52eeed5d0a
commit 60ef6e167e

View File

@@ -13,6 +13,7 @@
#include <projectexplorer/target.h>
#include <utils/aspects.h>
#include <utils/process.h>
#include <QDateTime>
@@ -75,6 +76,9 @@ private:
void ConfigureStep::doRun()
{
using namespace Tasking;
const auto onSetup = [this] {
// Check whether we need to run configure
const FilePath configure = project()->projectDirectory() / "configure";
const FilePath configStatus = buildDirectory() / "config.status";
@@ -84,8 +88,7 @@ void ConfigureStep::doRun()
if (!m_runConfigure) {
emit addOutput(Tr::tr("Configuration unchanged, skipping configure step."), OutputFormat::NormalMessage);
emit finished(true);
return;
return SetupResult::StopWithDone;
}
ProcessParameters *param = processParameters();
@@ -93,9 +96,11 @@ void ConfigureStep::doRun()
param->setCommandLine(getCommandLine(param->command().arguments()));
setSummaryText(param->summaryInWorkdir(displayName()));
}
return SetupResult::Continue;
};
const auto onDone = [this] { m_runConfigure = false; };
m_runConfigure = false;
AbstractProcessStep::doRun();
runTaskTree({onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask()});
}
// ConfigureStepFactory