aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotoolsprojectmanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/autotoolsprojectmanager')
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp26
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h9
2 files changed, 10 insertions, 25 deletions
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index 9a9afa158a..a4dba21818 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -97,28 +97,18 @@ AutotoolsBuildConfigurationFactory::AutotoolsBuildConfigurationFactory()
setSupportedProjectMimeTypeName(Constants::MAKEFILE_MIMETYPE);
}
-QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath) const
-{
- return {createBuildInfo(k, projectPath)};
-}
-
-QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableSetups(const Kit *k, const FilePath &projectPath) const
-{
- const QString path = projectPath.toFileInfo().absolutePath();
- BuildInfo info = createBuildInfo(k, Utils::FilePath::fromString(path));
- //: The name of the build configuration created by default for a autotools project.
- info.displayName = tr("Default");
- return {info};
-}
-
-BuildInfo AutotoolsBuildConfigurationFactory::createBuildInfo(const Kit *k,
- const Utils::FilePath &buildDir) const
+QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableBuilds
+ (const Kit *k, const FilePath &projectPath, bool forSetup) const
{
BuildInfo info(this);
info.typeName = tr("Build");
- info.buildDirectory = buildDir;
+ info.buildDirectory = forSetup ? FilePath::fromString(projectPath.toFileInfo().absolutePath()) : projectPath;
info.kitId = k->id();
- return info;
+ if (forSetup) {
+ //: The name of the build configuration created by default for a autotools project.
+ info.displayName = tr("Default");
+ }
+ return {info};
}
BuildConfiguration::BuildType AutotoolsBuildConfiguration::buildType() const
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
index f5e83c8279..13d23834c3 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
@@ -29,8 +29,6 @@
#include <projectexplorer/buildconfiguration.h>
-namespace Utils { class FilePath; }
-
namespace AutotoolsProjectManager {
namespace Internal {
@@ -54,11 +52,8 @@ public:
private:
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
- const Utils::FilePath &projectPath) const override;
- QList<ProjectExplorer::BuildInfo> availableSetups(const ProjectExplorer::Kit *k,
- const Utils::FilePath &projectPath) const override;
-
- ProjectExplorer::BuildInfo createBuildInfo(const ProjectExplorer::Kit *k, const Utils::FilePath &buildDir) const;
+ const Utils::FilePath &projectPath,
+ bool forSetup) const override;
};
} // namespace Internal