forked from qt-creator/qt-creator
Autotools: Use string aspect directly in configure step
Task-number: QTCREATORBUG-29168 Change-Id: I5c9a69fff51f01d5498eba6bbdf676be22fe5e82 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -37,48 +37,42 @@ namespace AutotoolsProjectManager::Internal {
|
|||||||
class ConfigureStep final : public AbstractProcessStep
|
class ConfigureStep final : public AbstractProcessStep
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConfigureStep(BuildStepList *bsl, Id id);
|
ConfigureStep(BuildStepList *bsl, Id id)
|
||||||
|
: AbstractProcessStep(bsl, id)
|
||||||
|
{
|
||||||
|
arguments.setDisplayStyle(StringAspect::LineEditDisplay);
|
||||||
|
arguments.setSettingsKey("AutotoolsProjectManager.ConfigureStep.AdditionalArguments");
|
||||||
|
arguments.setLabelText(Tr::tr("Arguments:"));
|
||||||
|
arguments.setHistoryCompleter("AutotoolsPM.History.ConfigureArgs");
|
||||||
|
|
||||||
void setAdditionalArguments(const QString &list);
|
connect(&arguments, &BaseAspect::changed, this, [this] {
|
||||||
|
m_runConfigure = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
setCommandLineProvider([this] {
|
||||||
|
return getCommandLine(arguments());
|
||||||
|
});
|
||||||
|
|
||||||
|
setSummaryUpdater([this] {
|
||||||
|
ProcessParameters param;
|
||||||
|
setupProcessParameters(¶m);
|
||||||
|
|
||||||
|
return param.summaryInWorkdir(displayName());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doRun() final;
|
void doRun() final;
|
||||||
|
|
||||||
CommandLine getCommandLine(const QString &arguments);
|
CommandLine getCommandLine(const QString &arguments)
|
||||||
|
{
|
||||||
|
return {project()->projectDirectory() / "configure", arguments, CommandLine::Raw};
|
||||||
|
}
|
||||||
|
|
||||||
bool m_runConfigure = false;
|
bool m_runConfigure = false;
|
||||||
|
StringAspect arguments{this};
|
||||||
};
|
};
|
||||||
|
|
||||||
ConfigureStep::ConfigureStep(BuildStepList *bsl, Id id)
|
|
||||||
: AbstractProcessStep(bsl, id)
|
|
||||||
{
|
|
||||||
auto arguments = addAspect<StringAspect>();
|
|
||||||
arguments->setDisplayStyle(StringAspect::LineEditDisplay);
|
|
||||||
arguments->setSettingsKey("AutotoolsProjectManager.ConfigureStep.AdditionalArguments");
|
|
||||||
arguments->setLabelText(Tr::tr("Arguments:"));
|
|
||||||
arguments->setHistoryCompleter("AutotoolsPM.History.ConfigureArgs");
|
|
||||||
|
|
||||||
connect(arguments, &BaseAspect::changed, this, [this] {
|
|
||||||
m_runConfigure = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
setCommandLineProvider([this, arguments] {
|
|
||||||
return getCommandLine(arguments->value());
|
|
||||||
});
|
|
||||||
|
|
||||||
setSummaryUpdater([this] {
|
|
||||||
ProcessParameters param;
|
|
||||||
setupProcessParameters(¶m);
|
|
||||||
|
|
||||||
return param.summaryInWorkdir(displayName());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandLine ConfigureStep::getCommandLine(const QString &arguments)
|
|
||||||
{
|
|
||||||
return {project()->projectDirectory() / "configure", arguments, CommandLine::Raw};
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigureStep::doRun()
|
void ConfigureStep::doRun()
|
||||||
{
|
{
|
||||||
// Check whether we need to run configure
|
// Check whether we need to run configure
|
||||||
|
|||||||
Reference in New Issue
Block a user