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,33 +37,20 @@ namespace AutotoolsProjectManager::Internal {
|
||||
class ConfigureStep final : public AbstractProcessStep
|
||||
{
|
||||
public:
|
||||
ConfigureStep(BuildStepList *bsl, Id id);
|
||||
|
||||
void setAdditionalArguments(const QString &list);
|
||||
|
||||
private:
|
||||
void doRun() final;
|
||||
|
||||
CommandLine getCommandLine(const QString &arguments);
|
||||
|
||||
bool m_runConfigure = false;
|
||||
};
|
||||
|
||||
ConfigureStep::ConfigureStep(BuildStepList *bsl, Id id)
|
||||
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");
|
||||
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] {
|
||||
connect(&arguments, &BaseAspect::changed, this, [this] {
|
||||
m_runConfigure = true;
|
||||
});
|
||||
|
||||
setCommandLineProvider([this, arguments] {
|
||||
return getCommandLine(arguments->value());
|
||||
setCommandLineProvider([this] {
|
||||
return getCommandLine(arguments());
|
||||
});
|
||||
|
||||
setSummaryUpdater([this] {
|
||||
@@ -74,11 +61,18 @@ ConfigureStep::ConfigureStep(BuildStepList *bsl, Id id)
|
||||
});
|
||||
}
|
||||
|
||||
CommandLine ConfigureStep::getCommandLine(const QString &arguments)
|
||||
private:
|
||||
void doRun() final;
|
||||
|
||||
CommandLine getCommandLine(const QString &arguments)
|
||||
{
|
||||
return {project()->projectDirectory() / "configure", arguments, CommandLine::Raw};
|
||||
}
|
||||
|
||||
bool m_runConfigure = false;
|
||||
StringAspect arguments{this};
|
||||
};
|
||||
|
||||
void ConfigureStep::doRun()
|
||||
{
|
||||
// Check whether we need to run configure
|
||||
|
||||
Reference in New Issue
Block a user