AutoreconfStep: Employ task tree for running

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

View File

@@ -13,6 +13,7 @@
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <utils/aspects.h> #include <utils/aspects.h>
#include <utils/process.h>
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Utils; using namespace Utils;
@@ -61,6 +62,9 @@ public:
void doRun() override void doRun() override
{ {
using namespace Tasking;
const auto onSetup = [this] {
// Check whether we need to run autoreconf // Check whether we need to run autoreconf
const FilePath configure = project()->projectDirectory() / "configure"; const FilePath configure = project()->projectDirectory() / "configure";
if (!configure.exists()) if (!configure.exists())
@@ -69,12 +73,13 @@ public:
if (!m_runAutoreconf) { if (!m_runAutoreconf) {
emit addOutput(Tr::tr("Configuration unchanged, skipping autoreconf step."), emit addOutput(Tr::tr("Configuration unchanged, skipping autoreconf step."),
OutputFormat::NormalMessage); OutputFormat::NormalMessage);
emit finished(true); return SetupResult::StopWithDone;
return;
} }
return SetupResult::Continue;
};
const auto onDone = [this] { m_runAutoreconf = false; };
m_runAutoreconf = false; runTaskTree({onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask()});
AbstractProcessStep::doRun();
} }
private: private: