forked from qt-creator/qt-creator
AbstractProcessStep: Use task tree for all subclasses
Introduce AbstractProcessStep::runRecipe() virtual method with the default implementation. Task-number: QTCREATORBUG-29168 Change-Id: Iac75f4c38f8ee91ad8ac9324bb27881a3722911f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -696,7 +696,7 @@ static bool copyFileIfNewer(const FilePath &sourceFilePath,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidBuildApkStep::doRun()
|
Tasking::GroupItem AndroidBuildApkStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -854,7 +854,7 @@ void AndroidBuildApkStep::doRun()
|
|||||||
onGroupDone(onDone),
|
onGroupDone(onDone),
|
||||||
defaultProcessTask()
|
defaultProcessTask()
|
||||||
};
|
};
|
||||||
runTaskTree(root);
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidBuildApkStep::reportWarningOrError(const QString &message, Task::TaskType type)
|
void AndroidBuildApkStep::reportWarningOrError(const QString &message, Task::TaskType type)
|
||||||
|
@@ -66,7 +66,7 @@ private:
|
|||||||
bool verifyKeystorePassword();
|
bool verifyKeystorePassword();
|
||||||
bool verifyCertificatePassword();
|
bool verifyCertificatePassword();
|
||||||
|
|
||||||
void doRun() override;
|
Tasking::GroupItem runRecipe() final;
|
||||||
void stdError(const QString &output);
|
void stdError(const QString &output);
|
||||||
|
|
||||||
void reportWarningOrError(const QString &message, ProjectExplorer::Task::TaskType type);
|
void reportWarningOrError(const QString &message, ProjectExplorer::Task::TaskType type);
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool init() final;
|
bool init() final;
|
||||||
void setupOutputFormatter(OutputFormatter *formatter) final;
|
void setupOutputFormatter(OutputFormatter *formatter) final;
|
||||||
void doRun() final;
|
Tasking::GroupItem runRecipe() final;
|
||||||
|
|
||||||
void reportWarningOrError(const QString &message, ProjectExplorer::Task::TaskType type);
|
void reportWarningOrError(const QString &message, ProjectExplorer::Task::TaskType type);
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ void AndroidPackageInstallationStep::setupOutputFormatter(OutputFormatter *forma
|
|||||||
AbstractProcessStep::setupOutputFormatter(formatter);
|
AbstractProcessStep::setupOutputFormatter(formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidPackageInstallationStep::doRun()
|
Tasking::GroupItem AndroidPackageInstallationStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ void AndroidPackageInstallationStep::doRun()
|
|||||||
return SetupResult::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
runTaskTree({onGroupSetup(onSetup), defaultProcessTask()});
|
return Group { onGroupSetup(onSetup), defaultProcessTask() };
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidPackageInstallationStep::reportWarningOrError(const QString &message,
|
void AndroidPackageInstallationStep::reportWarningOrError(const QString &message,
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
AutogenStep(BuildStepList *bsl, Id id);
|
AutogenStep(BuildStepList *bsl, Id id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doRun() final;
|
Tasking::GroupItem runRecipe() final;
|
||||||
|
|
||||||
bool m_runAutogen = false;
|
bool m_runAutogen = false;
|
||||||
StringAspect m_arguments{this};
|
StringAspect m_arguments{this};
|
||||||
@@ -70,7 +70,7 @@ AutogenStep::AutogenStep(BuildStepList *bsl, Id id) : AbstractProcessStep(bsl, i
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutogenStep::doRun()
|
Tasking::GroupItem AutogenStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ void AutogenStep::doRun()
|
|||||||
};
|
};
|
||||||
const auto onDone = [this] { m_runAutogen = false; };
|
const auto onDone = [this] { m_runAutogen = false; };
|
||||||
|
|
||||||
runTaskTree({onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask()});
|
return Group { onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask() };
|
||||||
}
|
}
|
||||||
|
|
||||||
// AutogenStepFactory
|
// AutogenStepFactory
|
||||||
|
@@ -60,7 +60,8 @@ public:
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void doRun() override
|
private:
|
||||||
|
Tasking::GroupItem runRecipe() final
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -79,10 +80,9 @@ public:
|
|||||||
};
|
};
|
||||||
const auto onDone = [this] { m_runAutoreconf = false; };
|
const auto onDone = [this] { m_runAutoreconf = false; };
|
||||||
|
|
||||||
runTaskTree({onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask()});
|
return Group { onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask() };
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
bool m_runAutoreconf = false;
|
bool m_runAutoreconf = false;
|
||||||
StringAspect arguments{this};
|
StringAspect arguments{this};
|
||||||
};
|
};
|
||||||
|
@@ -63,7 +63,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doRun() final;
|
Tasking::GroupItem runRecipe() final;
|
||||||
|
|
||||||
CommandLine getCommandLine(const QString &arguments)
|
CommandLine getCommandLine(const QString &arguments)
|
||||||
{
|
{
|
||||||
@@ -74,7 +74,7 @@ private:
|
|||||||
StringAspect arguments{this};
|
StringAspect arguments{this};
|
||||||
};
|
};
|
||||||
|
|
||||||
void ConfigureStep::doRun()
|
Tasking::GroupItem ConfigureStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ void ConfigureStep::doRun()
|
|||||||
};
|
};
|
||||||
const auto onDone = [this] { m_runConfigure = false; };
|
const auto onDone = [this] { m_runConfigure = false; };
|
||||||
|
|
||||||
runTaskTree({onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask()});
|
return Group { onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask() };
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfigureStepFactory
|
// ConfigureStepFactory
|
||||||
|
@@ -347,7 +347,7 @@ void CMakeBuildStep::setupOutputFormatter(Utils::OutputFormatter *formatter)
|
|||||||
CMakeAbstractProcessStep::setupOutputFormatter(formatter);
|
CMakeAbstractProcessStep::setupOutputFormatter(formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeBuildStep::doRun()
|
Tasking::GroupItem CMakeBuildStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -380,8 +380,7 @@ void CMakeBuildStep::doRun()
|
|||||||
onGroupDone(onEnd),
|
onGroupDone(onEnd),
|
||||||
onGroupError(onEnd)
|
onGroupError(onEnd)
|
||||||
};
|
};
|
||||||
|
return root;
|
||||||
runTaskTree(root);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CMakeBuildStep::defaultBuildTarget() const
|
QString CMakeBuildStep::defaultBuildTarget() const
|
||||||
|
@@ -81,7 +81,7 @@ private:
|
|||||||
|
|
||||||
bool init() override;
|
bool init() override;
|
||||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||||
void doRun() override;
|
Tasking::GroupItem runRecipe() final;
|
||||||
QWidget *createConfigWidget() override;
|
QWidget *createConfigWidget() override;
|
||||||
|
|
||||||
Utils::FilePath cmakeExecutable() const;
|
Utils::FilePath cmakeExecutable() const;
|
||||||
|
@@ -3,14 +3,11 @@
|
|||||||
|
|
||||||
#include "abstractprocessstep.h"
|
#include "abstractprocessstep.h"
|
||||||
|
|
||||||
#include "buildconfiguration.h"
|
|
||||||
#include "buildstep.h"
|
|
||||||
#include "processparameters.h"
|
#include "processparameters.h"
|
||||||
#include "projectexplorer.h"
|
#include "projectexplorer.h"
|
||||||
#include "projectexplorersettings.h"
|
#include "projectexplorersettings.h"
|
||||||
#include "projectexplorertr.h"
|
#include "projectexplorertr.h"
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
|
||||||
#include <utils/outputformatter.h>
|
#include <utils/outputformatter.h>
|
||||||
#include <utils/process.h>
|
#include <utils/process.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -75,7 +72,6 @@ public:
|
|||||||
Private(AbstractProcessStep *q) : q(q) {}
|
Private(AbstractProcessStep *q) : q(q) {}
|
||||||
|
|
||||||
AbstractProcessStep *q;
|
AbstractProcessStep *q;
|
||||||
std::unique_ptr<Process> m_process;
|
|
||||||
std::unique_ptr<TaskTree> m_taskTree;
|
std::unique_ptr<TaskTree> m_taskTree;
|
||||||
ProcessParameters m_param;
|
ProcessParameters m_param;
|
||||||
ProcessParameters *m_displayedParams = &m_param;
|
ProcessParameters *m_displayedParams = &m_param;
|
||||||
@@ -84,8 +80,8 @@ public:
|
|||||||
std::function<void(Environment &)> m_environmentModifier;
|
std::function<void(Environment &)> m_environmentModifier;
|
||||||
bool m_ignoreReturnValue = false;
|
bool m_ignoreReturnValue = false;
|
||||||
bool m_lowPriority = false;
|
bool m_lowPriority = false;
|
||||||
std::unique_ptr<QTextDecoder> stdoutStream;
|
std::unique_ptr<QTextDecoder> stdOutDecoder;
|
||||||
std::unique_ptr<QTextDecoder> stderrStream;
|
std::unique_ptr<QTextDecoder> stdErrDecoder;
|
||||||
OutputFormatter *outputFormatter = nullptr;
|
OutputFormatter *outputFormatter = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -148,12 +144,15 @@ void AbstractProcessStep::setWorkingDirectoryProvider(const std::function<FilePa
|
|||||||
|
|
||||||
bool AbstractProcessStep::init()
|
bool AbstractProcessStep::init()
|
||||||
{
|
{
|
||||||
if (d->m_process || d->m_taskTree)
|
if (d->m_taskTree)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!setupProcessParameters(processParameters()))
|
if (!setupProcessParameters(processParameters()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
d->stdOutDecoder = std::make_unique<QTextDecoder>(buildEnvironment().hasKey("VSLANG")
|
||||||
|
? QTextCodec::codecForName("UTF-8") : QTextCodec::codecForLocale());
|
||||||
|
d->stdErrDecoder = std::make_unique<QTextDecoder>(QTextCodec::codecForLocale());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,29 +170,19 @@ void AbstractProcessStep::setupOutputFormatter(OutputFormatter *formatter)
|
|||||||
|
|
||||||
void AbstractProcessStep::doRun()
|
void AbstractProcessStep::doRun()
|
||||||
{
|
{
|
||||||
setupStreams();
|
d->m_taskTree.reset(new TaskTree({runRecipe()}));
|
||||||
|
connect(d->m_taskTree.get(), &TaskTree::progressValueChanged, this, [this](int value) {
|
||||||
d->m_process.reset(new Process);
|
emit progress(qRound(double(value) * 100 / std::max(d->m_taskTree->progressMaximum(), 1)), {});
|
||||||
if (!setupProcess(*d->m_process.get())) {
|
|
||||||
d->m_process.reset();
|
|
||||||
finish(ProcessResult::StartFailed);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
connect(d->m_process.get(), &Process::done, this, [this] {
|
|
||||||
handleProcessDone(*d->m_process);
|
|
||||||
const ProcessResult result = d->outputFormatter->hasFatalErrors()
|
|
||||||
? ProcessResult::FinishedWithError : d->m_process->result();
|
|
||||||
d->m_process.release()->deleteLater();
|
|
||||||
finish(result);
|
|
||||||
});
|
});
|
||||||
d->m_process->start();
|
connect(d->m_taskTree.get(), &TaskTree::done, this, [this] {
|
||||||
}
|
emit finished(true);
|
||||||
|
d->m_taskTree.release()->deleteLater();
|
||||||
void AbstractProcessStep::setupStreams()
|
});
|
||||||
{
|
connect(d->m_taskTree.get(), &TaskTree::errorOccurred, this, [this] {
|
||||||
d->stdoutStream = std::make_unique<QTextDecoder>(buildEnvironment().hasKey("VSLANG")
|
emit finished(false);
|
||||||
? QTextCodec::codecForName("UTF-8") : QTextCodec::codecForLocale());
|
d->m_taskTree.release()->deleteLater();
|
||||||
d->stderrStream = std::make_unique<QTextDecoder>(QTextCodec::codecForLocale());
|
});
|
||||||
|
d->m_taskTree->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupItem AbstractProcessStep::defaultProcessTask()
|
GroupItem AbstractProcessStep::defaultProcessTask()
|
||||||
@@ -234,11 +223,11 @@ bool AbstractProcessStep::setupProcess(Process &process)
|
|||||||
process.setLowPriority();
|
process.setLowPriority();
|
||||||
|
|
||||||
connect(&process, &Process::readyReadStandardOutput, this, [this, &process] {
|
connect(&process, &Process::readyReadStandardOutput, this, [this, &process] {
|
||||||
emit addOutput(d->stdoutStream->toUnicode(process.readAllRawStandardOutput()),
|
emit addOutput(d->stdOutDecoder->toUnicode(process.readAllRawStandardOutput()),
|
||||||
OutputFormat::Stdout, DontAppendNewline);
|
OutputFormat::Stdout, DontAppendNewline);
|
||||||
});
|
});
|
||||||
connect(&process, &Process::readyReadStandardError, this, [this, &process] {
|
connect(&process, &Process::readyReadStandardError, this, [this, &process] {
|
||||||
emit addOutput(d->stderrStream->toUnicode(process.readAllRawStandardError()),
|
emit addOutput(d->stdErrDecoder->toUnicode(process.readAllRawStandardError()),
|
||||||
OutputFormat::Stderr, DontAppendNewline);
|
OutputFormat::Stderr, DontAppendNewline);
|
||||||
});
|
});
|
||||||
connect(&process, &Process::started, this, [this] {
|
connect(&process, &Process::started, this, [this] {
|
||||||
@@ -273,25 +262,6 @@ void AbstractProcessStep::handleProcessDone(const Process &process)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractProcessStep::runTaskTree(const Group &recipe)
|
|
||||||
{
|
|
||||||
setupStreams();
|
|
||||||
|
|
||||||
d->m_taskTree.reset(new TaskTree(recipe));
|
|
||||||
connect(d->m_taskTree.get(), &TaskTree::progressValueChanged, this, [this](int value) {
|
|
||||||
emit progress(qRound(double(value) * 100 / std::max(d->m_taskTree->progressMaximum(), 1)), {});
|
|
||||||
});
|
|
||||||
connect(d->m_taskTree.get(), &TaskTree::done, this, [this] {
|
|
||||||
emit finished(true);
|
|
||||||
d->m_taskTree.release()->deleteLater();
|
|
||||||
});
|
|
||||||
connect(d->m_taskTree.get(), &TaskTree::errorOccurred, this, [this] {
|
|
||||||
emit finished(false);
|
|
||||||
d->m_taskTree.release()->deleteLater();
|
|
||||||
});
|
|
||||||
d->m_taskTree->start();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractProcessStep::setLowPriority()
|
void AbstractProcessStep::setLowPriority()
|
||||||
{
|
{
|
||||||
d->m_lowPriority = true;
|
d->m_lowPriority = true;
|
||||||
@@ -300,11 +270,6 @@ void AbstractProcessStep::setLowPriority()
|
|||||||
void AbstractProcessStep::doCancel()
|
void AbstractProcessStep::doCancel()
|
||||||
{
|
{
|
||||||
const QString message = Tr::tr("The build step was ended forcefully.");
|
const QString message = Tr::tr("The build step was ended forcefully.");
|
||||||
if (d->m_process) {
|
|
||||||
emit addOutput(message, OutputFormat::ErrorMessage);
|
|
||||||
d->m_process.reset();
|
|
||||||
finish(ProcessResult::TerminatedAbnormally);
|
|
||||||
}
|
|
||||||
if (d->m_taskTree) {
|
if (d->m_taskTree) {
|
||||||
d->m_taskTree.reset();
|
d->m_taskTree.reset();
|
||||||
emit addOutput(message, OutputFormat::ErrorMessage);
|
emit addOutput(message, OutputFormat::ErrorMessage);
|
||||||
@@ -352,11 +317,9 @@ void AbstractProcessStep::setDisplayedParameters(ProcessParameters *params)
|
|||||||
d->m_displayedParams = params;
|
d->m_displayedParams = params;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractProcessStep::finish(ProcessResult result)
|
GroupItem AbstractProcessStep::runRecipe()
|
||||||
{
|
{
|
||||||
const bool success = result == ProcessResult::FinishedWithSuccess
|
return Group { ignoreReturnValue() ? finishAllAndDone : stopOnError, defaultProcessTask() };
|
||||||
|| (result == ProcessResult::FinishedWithError && d->m_ignoreReturnValue);
|
|
||||||
emit finished(success);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -5,18 +5,12 @@
|
|||||||
|
|
||||||
#include "buildstep.h"
|
#include "buildstep.h"
|
||||||
|
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class CommandLine;
|
class CommandLine;
|
||||||
class Process;
|
class Process;
|
||||||
enum class ProcessResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Tasking {
|
namespace Tasking { class GroupItem; }
|
||||||
class Group;
|
|
||||||
class GroupItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class ProcessParameters;
|
class ProcessParameters;
|
||||||
@@ -45,19 +39,17 @@ protected:
|
|||||||
|
|
||||||
bool init() override;
|
bool init() override;
|
||||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||||
void doRun() override;
|
void doRun() final;
|
||||||
void doCancel() override;
|
void doCancel() final;
|
||||||
void setLowPriority();
|
void setLowPriority();
|
||||||
void setDisplayedParameters(ProcessParameters *params);
|
void setDisplayedParameters(ProcessParameters *params);
|
||||||
|
|
||||||
Tasking::GroupItem defaultProcessTask();
|
Tasking::GroupItem defaultProcessTask();
|
||||||
bool setupProcess(Utils::Process &process);
|
bool setupProcess(Utils::Process &process);
|
||||||
void handleProcessDone(const Utils::Process &process);
|
void handleProcessDone(const Utils::Process &process);
|
||||||
void runTaskTree(const Tasking::Group &recipe);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupStreams();
|
virtual Tasking::GroupItem runRecipe();
|
||||||
void finish(Utils::ProcessResult result);
|
|
||||||
|
|
||||||
class Private;
|
class Private;
|
||||||
Private *d;
|
Private *d;
|
||||||
|
@@ -59,7 +59,7 @@ void PySideBuildStep::updatePySideProjectPath(const FilePath &pySideProjectPath)
|
|||||||
m_pysideProject.setValue(pySideProjectPath);
|
m_pysideProject.setValue(pySideProjectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PySideBuildStep::doRun()
|
Tasking::GroupItem PySideBuildStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -69,10 +69,9 @@ void PySideBuildStep::doRun()
|
|||||||
return SetupResult::Continue;
|
return SetupResult::Continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
runTaskTree({onGroupSetup(onSetup), defaultProcessTask()});
|
return Group { onGroupSetup(onSetup), defaultProcessTask() };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// PySideBuildConfiguration
|
// PySideBuildConfiguration
|
||||||
|
|
||||||
class PySideBuildConfiguration : public BuildConfiguration
|
class PySideBuildConfiguration : public BuildConfiguration
|
||||||
|
@@ -17,7 +17,7 @@ public:
|
|||||||
void updatePySideProjectPath(const Utils::FilePath &pySideProjectPath);
|
void updatePySideProjectPath(const Utils::FilePath &pySideProjectPath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doRun() override;
|
Tasking::GroupItem runRecipe() final;
|
||||||
|
|
||||||
Utils::FilePathAspect m_pysideProject{this};
|
Utils::FilePathAspect m_pysideProject{this};
|
||||||
};
|
};
|
||||||
|
@@ -42,7 +42,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool init() override;
|
bool init() override;
|
||||||
void setupOutputFormatter(OutputFormatter *formatter) override;
|
void setupOutputFormatter(OutputFormatter *formatter) override;
|
||||||
void doRun() override;
|
Tasking::GroupItem runRecipe() final;
|
||||||
QStringList displayArguments() const override;
|
QStringList displayArguments() const override;
|
||||||
|
|
||||||
bool m_scriptTarget = false;
|
bool m_scriptTarget = false;
|
||||||
@@ -200,7 +200,7 @@ void QmakeMakeStep::setupOutputFormatter(OutputFormatter *formatter)
|
|||||||
AbstractProcessStep::setupOutputFormatter(formatter);
|
AbstractProcessStep::setupOutputFormatter(formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeMakeStep::doRun()
|
Tasking::GroupItem QmakeMakeStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -226,7 +226,12 @@ void QmakeMakeStep::doRun()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
runTaskTree({onGroupSetup(onSetup), onGroupError(onError), defaultProcessTask()});
|
return Group {
|
||||||
|
ignoreReturnValue() ? finishAllAndDone : stopOnError,
|
||||||
|
onGroupSetup(onSetup),
|
||||||
|
onGroupError(onError),
|
||||||
|
defaultProcessTask()
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QmakeMakeStep::displayArguments() const
|
QStringList QmakeMakeStep::displayArguments() const
|
||||||
|
@@ -265,7 +265,7 @@ void QMakeStep::setupOutputFormatter(OutputFormatter *formatter)
|
|||||||
AbstractProcessStep::setupOutputFormatter(formatter);
|
AbstractProcessStep::setupOutputFormatter(formatter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStep::doRun()
|
Tasking::GroupItem QMakeStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ void QMakeStep::doRun()
|
|||||||
if (m_runMakeQmake)
|
if (m_runMakeQmake)
|
||||||
processList << ProcessTask(setupMakeQMake, onProcessDone, onProcessDone);
|
processList << ProcessTask(setupMakeQMake, onProcessDone, onProcessDone);
|
||||||
|
|
||||||
runTaskTree(Group(processList));
|
return Group(processList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStep::setForced(bool b)
|
void QMakeStep::setForced(bool b)
|
||||||
|
@@ -101,7 +101,6 @@ public:
|
|||||||
QmakeBuildSystem *qmakeBuildSystem() const;
|
QmakeBuildSystem *qmakeBuildSystem() const;
|
||||||
bool init() override;
|
bool init() override;
|
||||||
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
|
||||||
void doRun() override;
|
|
||||||
QWidget *createConfigWidget() override;
|
QWidget *createConfigWidget() override;
|
||||||
void setForced(bool b);
|
void setForced(bool b);
|
||||||
|
|
||||||
@@ -138,6 +137,7 @@ protected:
|
|||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Tasking::GroupItem runRecipe() final;
|
||||||
// slots for handling buildconfiguration/step signals
|
// slots for handling buildconfiguration/step signals
|
||||||
void qtVersionChanged();
|
void qtVersionChanged();
|
||||||
void qmakeBuildConfigChanged();
|
void qmakeBuildConfigChanged();
|
||||||
|
@@ -41,7 +41,7 @@ private:
|
|||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QWidget *createConfigWidget() override;
|
QWidget *createConfigWidget() override;
|
||||||
bool init() override;
|
bool init() override;
|
||||||
void doRun() override;
|
Tasking::GroupItem runRecipe() final;
|
||||||
bool isJobCountSupported() const override { return false; }
|
bool isJobCountSupported() const override { return false; }
|
||||||
|
|
||||||
void updateCommandFromAspect();
|
void updateCommandFromAspect();
|
||||||
@@ -188,7 +188,7 @@ bool MakeInstallStep::init()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MakeInstallStep::doRun()
|
Tasking::GroupItem MakeInstallStep::runRecipe()
|
||||||
{
|
{
|
||||||
using namespace Tasking;
|
using namespace Tasking;
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ void MakeInstallStep::doRun()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
runTaskTree({onGroupDone(onDone), onGroupError(onError), defaultProcessTask()});
|
return Group { onGroupDone(onDone), onGroupError(onError), defaultProcessTask() };
|
||||||
}
|
}
|
||||||
|
|
||||||
void MakeInstallStep::updateCommandFromAspect()
|
void MakeInstallStep::updateCommandFromAspect()
|
||||||
|
Reference in New Issue
Block a user