ProjectExplorer: Consolidate setup of build dir aspect

This is getting repetitive.

There's a new connect too, that's not wrong in the current two uses
and will be helpful in the upcoming Qbs one.

Change-Id: I4a4923a43937922c66be1f73822103b1e3e7b077
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2019-04-29 12:43:34 +02:00
parent c2ab89cc12
commit a64b969f6f
4 changed files with 18 additions and 19 deletions

View File

@@ -59,15 +59,8 @@ AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(Target *parent, Core::I
// /<foobar> is used so the un-changed check in setBuildDirectory() works correctly.
// The leading / is to avoid the relative the path expansion in BuildConfiguration::buildDirectory.
setBuildDirectory(Utils::FileName::fromString("/<foobar>"));
setBuildDirectoryHistoryCompleter("AutoTools.BuildDir.History");
setConfigWidgetDisplayName(tr("Autotools Manager"));
BaseStringAspect *bd = buildDirectoryAspect();
bd->setLabelText(tr("Build directory:"));
bd->setDisplayStyle(BaseStringAspect::PathChooserDisplay);
bd->setExpectedKind(PathChooser::Directory);
bd->setBaseFileName(parent->project()->projectDirectory());
bd->setEnvironment(environment());
bd->setHistoryCompleter("AutoTools.BuildDir.History");
}
void AutotoolsBuildConfiguration::initialize(const BuildInfo &info)