forked from qt-creator/qt-creator
Autotools: Self-register aspect in AutogenStep
Change-Id: I130ec25e6bf0bb6a45de7325834b8cc19f8c86e7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -42,23 +42,23 @@ private:
|
|||||||
void doRun() final;
|
void doRun() final;
|
||||||
|
|
||||||
bool m_runAutogen = false;
|
bool m_runAutogen = false;
|
||||||
|
StringAspect m_arguments{this};
|
||||||
};
|
};
|
||||||
|
|
||||||
AutogenStep::AutogenStep(BuildStepList *bsl, Id id) : AbstractProcessStep(bsl, id)
|
AutogenStep::AutogenStep(BuildStepList *bsl, Id id) : AbstractProcessStep(bsl, id)
|
||||||
{
|
{
|
||||||
auto arguments = addAspect<StringAspect>();
|
m_arguments.setSettingsKey("AutotoolsProjectManager.AutogenStep.AdditionalArguments");
|
||||||
arguments->setSettingsKey("AutotoolsProjectManager.AutogenStep.AdditionalArguments");
|
m_arguments.setLabelText(Tr::tr("Arguments:"));
|
||||||
arguments->setLabelText(Tr::tr("Arguments:"));
|
m_arguments.setDisplayStyle(StringAspect::LineEditDisplay);
|
||||||
arguments->setDisplayStyle(StringAspect::LineEditDisplay);
|
m_arguments.setHistoryCompleter("AutotoolsPM.History.AutogenStepArgs");
|
||||||
arguments->setHistoryCompleter("AutotoolsPM.History.AutogenStepArgs");
|
|
||||||
|
|
||||||
connect(arguments, &BaseAspect::changed, this, [this] { m_runAutogen = true; });
|
connect(&m_arguments, &BaseAspect::changed, this, [this] { m_runAutogen = true; });
|
||||||
|
|
||||||
setWorkingDirectoryProvider([this] { return project()->projectDirectory(); });
|
setWorkingDirectoryProvider([this] { return project()->projectDirectory(); });
|
||||||
|
|
||||||
setCommandLineProvider([this, arguments] {
|
setCommandLineProvider([this] {
|
||||||
return CommandLine(project()->projectDirectory() / "autogen.sh",
|
return CommandLine(project()->projectDirectory() / "autogen.sh",
|
||||||
arguments->value(),
|
m_arguments(),
|
||||||
CommandLine::Raw);
|
CommandLine::Raw);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user