forked from qt-creator/qt-creator
Autotools: Use new step widget update logic more intensively
Change-Id: I4dbd1c331152a408b6d7a60a4cbc793995153364 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -66,6 +66,24 @@ AutoreconfStep::AutoreconfStep(BuildStepList *bsl) : AbstractProcessStep(bsl, AU
|
||||
m_additionalArgumentsAspect->setValue("--force --install");
|
||||
m_additionalArgumentsAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||
m_additionalArgumentsAspect->setHistoryCompleter("AutotoolsPM.History.AutoreconfStepArgs");
|
||||
|
||||
connect(m_additionalArgumentsAspect, &ProjectConfigurationAspect::changed, this, [this] {
|
||||
m_runAutoreconf = true;
|
||||
});
|
||||
|
||||
setSummaryUpdater([this] {
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
|
||||
ProcessParameters param;
|
||||
param.setMacroExpander(bc->macroExpander());
|
||||
param.setEnvironment(bc->environment());
|
||||
param.setWorkingDirectory(bc->target()->project()->projectDirectory());
|
||||
param.setCommandLine({Utils::FilePath::fromString("autoreconf"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
Utils::CommandLine::Raw});
|
||||
|
||||
return param.summary(displayName());
|
||||
});
|
||||
}
|
||||
|
||||
bool AutoreconfStep::init()
|
||||
@@ -101,31 +119,3 @@ void AutoreconfStep::doRun()
|
||||
m_runAutoreconf = false;
|
||||
AbstractProcessStep::doRun();
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *AutoreconfStep::createConfigWidget()
|
||||
{
|
||||
auto widget = AbstractProcessStep::createConfigWidget();
|
||||
|
||||
auto updateDetails = [this, widget] {
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
|
||||
ProcessParameters param;
|
||||
param.setMacroExpander(bc->macroExpander());
|
||||
param.setEnvironment(bc->environment());
|
||||
param.setWorkingDirectory(bc->target()->project()->projectDirectory());
|
||||
param.setCommandLine({Utils::FilePath::fromString("autoreconf"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
Utils::CommandLine::Raw});
|
||||
|
||||
widget->setSummaryText(param.summary(displayName()));
|
||||
};
|
||||
|
||||
updateDetails();
|
||||
|
||||
connect(m_additionalArgumentsAspect, &ProjectConfigurationAspect::changed, this, [=] {
|
||||
updateDetails();
|
||||
m_runAutoreconf = true;
|
||||
});
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user