forked from qt-creator/qt-creator
ProjectExplorer: Replace BuildConfigurationFactory::availableBuilds
... by a function object. Change-Id: I9953ba6915c0177e7c4067d36dd755fc2ba5cf84 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -75,20 +75,19 @@ AutotoolsBuildConfigurationFactory::AutotoolsBuildConfigurationFactory()
|
||||
|
||||
setSupportedProjectType(Constants::AUTOTOOLS_PROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::MAKEFILE_MIMETYPE);
|
||||
}
|
||||
|
||||
QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableBuilds
|
||||
(const Kit *k, const FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.buildDirectory = forSetup ? FilePath::fromString(projectPath.toFileInfo().absolutePath()) : projectPath;
|
||||
info.kitId = k->id();
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a autotools project.
|
||||
info.displayName = tr("Default");
|
||||
}
|
||||
return {info};
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.buildDirectory = forSetup
|
||||
? FilePath::fromString(projectPath.toFileInfo().absolutePath()) : projectPath;
|
||||
info.kitId = k->id();
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a autotools project.
|
||||
info.displayName = tr("Default");
|
||||
}
|
||||
return QList<BuildInfo>{info};
|
||||
});
|
||||
}
|
||||
|
||||
} // Internal
|
||||
|
||||
@@ -46,11 +46,6 @@ class AutotoolsBuildConfigurationFactory : public ProjectExplorer::BuildConfigur
|
||||
|
||||
public:
|
||||
AutotoolsBuildConfigurationFactory();
|
||||
|
||||
private:
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -408,6 +408,24 @@ CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory()
|
||||
|
||||
setSupportedProjectType(CMakeProjectManager::Constants::CMAKEPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::CMAKEPROJECTMIMETYPE);
|
||||
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
QList<BuildInfo> result;
|
||||
|
||||
FilePath path = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
|
||||
for (int type = BuildTypeDebug; type != BuildTypeLast; ++type) {
|
||||
BuildInfo info = createBuildInfo(k, path.toString(), BuildType(type));
|
||||
if (forSetup) {
|
||||
info.buildDirectory = CMakeBuildConfiguration::shadowBuildDirectory(projectPath,
|
||||
k,
|
||||
info.typeName,
|
||||
info.buildType);
|
||||
}
|
||||
result << info;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
CMakeBuildConfigurationFactory::BuildType CMakeBuildConfigurationFactory::buildTypeFromByteArray(
|
||||
@@ -439,27 +457,6 @@ BuildConfiguration::BuildType CMakeBuildConfigurationFactory::cmakeBuildTypeToBu
|
||||
return BuildConfiguration::Unknown;
|
||||
}
|
||||
|
||||
QList<BuildInfo> CMakeBuildConfigurationFactory::availableBuilds(const Kit *k,
|
||||
const FilePath &projectPath,
|
||||
bool forSetup) const
|
||||
{
|
||||
QList<BuildInfo> result;
|
||||
|
||||
FilePath path = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
|
||||
for (int type = BuildTypeDebug; type != BuildTypeLast; ++type) {
|
||||
BuildInfo info = createBuildInfo(k, path.toString(), BuildType(type));
|
||||
if (forSetup) {
|
||||
info.buildDirectory = CMakeBuildConfiguration::shadowBuildDirectory(projectPath,
|
||||
k,
|
||||
info.typeName,
|
||||
info.buildType);
|
||||
}
|
||||
result << info;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
BuildInfo CMakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
||||
const QString &,
|
||||
BuildType buildType) const
|
||||
|
||||
@@ -125,10 +125,6 @@ public:
|
||||
static BuildType buildTypeFromByteArray(const QByteArray &in);
|
||||
static ProjectExplorer::BuildConfiguration::BuildType cmakeBuildTypeToBuildType(const BuildType &in);
|
||||
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
|
||||
private:
|
||||
ProjectExplorer::BuildInfo createBuildInfo(const ProjectExplorer::Kit *k,
|
||||
const QString &sourceDir,
|
||||
|
||||
@@ -538,19 +538,17 @@ CompilationDatabaseBuildConfigurationFactory::CompilationDatabaseBuildConfigurat
|
||||
|
||||
setSupportedProjectType(Constants::COMPILATIONDATABASEPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::COMPILATIONDATABASEMIMETYPE);
|
||||
}
|
||||
|
||||
QList<BuildInfo> CompilationDatabaseBuildConfigurationFactory::availableBuilds
|
||||
(const Kit *kit, const FilePath &projectPath, bool) const
|
||||
{
|
||||
const QString name = tr("Release");
|
||||
ProjectExplorer::BuildInfo info(this);
|
||||
info.typeName = name;
|
||||
info.displayName = name;
|
||||
info.buildType = BuildConfiguration::Release;
|
||||
info.buildDirectory = projectPath.parentDir();
|
||||
info.kitId = kit->id();
|
||||
return {info};
|
||||
setBuildGenerator([this](const Kit *kit, const FilePath &projectPath, bool) {
|
||||
const QString name = tr("Release");
|
||||
ProjectExplorer::BuildInfo info(this);
|
||||
info.typeName = name;
|
||||
info.displayName = name;
|
||||
info.buildType = BuildConfiguration::Release;
|
||||
info.buildDirectory = projectPath.parentDir();
|
||||
info.kitId = kit->id();
|
||||
return QList<BuildInfo>{info};
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -100,10 +100,6 @@ class CompilationDatabaseBuildConfigurationFactory
|
||||
Q_OBJECT
|
||||
public:
|
||||
CompilationDatabaseBuildConfigurationFactory();
|
||||
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -76,22 +76,20 @@ GenericBuildConfigurationFactory::GenericBuildConfigurationFactory()
|
||||
|
||||
setSupportedProjectType(Constants::GENERICPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::GENERICMIMETYPE);
|
||||
}
|
||||
|
||||
QList<BuildInfo> GenericBuildConfigurationFactory::availableBuilds
|
||||
(const Kit *k, const FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.buildDirectory = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
info.kitId = k->id();
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.buildDirectory = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
info.kitId = k->id();
|
||||
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a generic project.
|
||||
info.displayName = tr("Default");
|
||||
}
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a generic project.
|
||||
info.displayName = tr("Default");
|
||||
}
|
||||
|
||||
return {info};
|
||||
return QList<BuildInfo>{info};
|
||||
});
|
||||
}
|
||||
|
||||
void GenericBuildConfiguration::addToEnvironment(Utils::Environment &env) const
|
||||
|
||||
@@ -46,11 +46,6 @@ class GenericBuildConfigurationFactory : public ProjectExplorer::BuildConfigurat
|
||||
|
||||
public:
|
||||
GenericBuildConfigurationFactory();
|
||||
|
||||
private:
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -85,25 +85,22 @@ NimbleBuildConfigurationFactory::NimbleBuildConfigurationFactory()
|
||||
registerBuildConfiguration<NimbleBuildConfiguration>(Constants::C_NIMBLEBUILDCONFIGURATION_ID);
|
||||
setSupportedProjectType(Constants::C_NIMBLEPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::C_NIMBLE_MIMETYPE);
|
||||
}
|
||||
|
||||
QList<BuildInfo> NimbleBuildConfigurationFactory::availableBuilds(const Kit *k, const Utils::FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
static const QList<BuildConfiguration::BuildType> configurations = {BuildConfiguration::Debug, BuildConfiguration::Release};
|
||||
return Utils::transform(configurations, [&](BuildConfiguration::BuildType buildType){
|
||||
BuildInfo info(this);
|
||||
info.buildType = buildType;
|
||||
info.kitId = k->id();
|
||||
|
||||
if (buildType == BuildConfiguration::Debug)
|
||||
info.typeName = tr("Debug");
|
||||
else if (buildType == BuildConfiguration::Release)
|
||||
info.typeName = tr("Release");
|
||||
|
||||
if (forSetup) {
|
||||
info.displayName = info.typeName;
|
||||
info.buildDirectory = projectPath.parentDir();
|
||||
}
|
||||
return info;
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
const auto oneBuild = [&](BuildConfiguration::BuildType buildType, const QString &typeName) {
|
||||
BuildInfo info(this);
|
||||
info.buildType = buildType;
|
||||
info.kitId = k->id();
|
||||
info.typeName = typeName;
|
||||
if (forSetup) {
|
||||
info.displayName = info.typeName;
|
||||
info.buildDirectory = projectPath.parentDir();
|
||||
}
|
||||
return info;
|
||||
};
|
||||
return QList<BuildInfo>{
|
||||
oneBuild(BuildConfiguration::Debug, tr("Debug")),
|
||||
oneBuild(BuildConfiguration::Release, tr("Release"))
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -54,11 +54,6 @@ class NimbleBuildConfigurationFactory : public ProjectExplorer::BuildConfigurati
|
||||
|
||||
public:
|
||||
NimbleBuildConfigurationFactory();
|
||||
|
||||
private:
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -134,31 +134,24 @@ NimBuildConfigurationFactory::NimBuildConfigurationFactory()
|
||||
registerBuildConfiguration<NimBuildConfiguration>(Constants::C_NIMBUILDCONFIGURATION_ID);
|
||||
setSupportedProjectType(Constants::C_NIMPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::C_NIM_PROJECT_MIMETYPE);
|
||||
}
|
||||
|
||||
QList<BuildInfo> NimBuildConfigurationFactory::availableBuilds
|
||||
(const Kit *k, const FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
QList<BuildInfo> result;
|
||||
for (auto buildType : {BuildConfiguration::Debug, BuildConfiguration::Release}) {
|
||||
BuildInfo info(this);
|
||||
info.buildType = buildType;
|
||||
info.kitId = k->id();
|
||||
|
||||
if (buildType == BuildConfiguration::Debug)
|
||||
info.typeName = tr("Debug");
|
||||
else if (buildType == BuildConfiguration::Profile)
|
||||
info.typeName = tr("Profile");
|
||||
else if (buildType == BuildConfiguration::Release)
|
||||
info.typeName = tr("Release");
|
||||
|
||||
if (forSetup) {
|
||||
info.displayName = info.typeName;
|
||||
info.buildDirectory = defaultBuildDirectory(k, projectPath, info.typeName, buildType);
|
||||
}
|
||||
result.push_back(info);
|
||||
}
|
||||
return result;
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
const auto oneBuild = [&](BuildConfiguration::BuildType buildType, const QString &typeName) {
|
||||
BuildInfo info(this);
|
||||
info.buildType = buildType;
|
||||
info.kitId = k->id();
|
||||
info.typeName = typeName;
|
||||
if (forSetup) {
|
||||
info.displayName = info.typeName;
|
||||
info.buildDirectory = defaultBuildDirectory(k, projectPath, info.typeName, buildType);
|
||||
}
|
||||
return info;
|
||||
};
|
||||
return QList<BuildInfo>{
|
||||
oneBuild(BuildConfiguration::Debug, tr("Debug")),
|
||||
oneBuild(BuildConfiguration::Release, tr("Release"))
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace Nim
|
||||
|
||||
@@ -58,11 +58,6 @@ class NimBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationF
|
||||
|
||||
public:
|
||||
NimBuildConfigurationFactory();
|
||||
|
||||
private:
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -508,13 +508,15 @@ const Tasks BuildConfigurationFactory::reportIssues(ProjectExplorer::Kit *kit, c
|
||||
|
||||
const QList<BuildInfo> BuildConfigurationFactory::allAvailableBuilds(const Target *parent) const
|
||||
{
|
||||
return availableBuilds(parent->kit(), parent->project()->projectFilePath(), false);
|
||||
QTC_ASSERT(m_buildGenerator, return {});
|
||||
return m_buildGenerator(parent->kit(), parent->project()->projectFilePath(), false);
|
||||
}
|
||||
|
||||
const QList<BuildInfo>
|
||||
BuildConfigurationFactory::allAvailableSetups(const Kit *k, const FilePath &projectPath) const
|
||||
{
|
||||
return availableBuilds(k, projectPath, /* forSetup = */ true);
|
||||
QTC_ASSERT(m_buildGenerator, return {});
|
||||
return m_buildGenerator(k, projectPath, /* forSetup = */ true);
|
||||
}
|
||||
|
||||
bool BuildConfigurationFactory::supportsTargetDeviceType(Core::Id id) const
|
||||
@@ -577,6 +579,11 @@ bool BuildConfigurationFactory::canHandle(const Target *target) const
|
||||
return true;
|
||||
}
|
||||
|
||||
void BuildConfigurationFactory::setBuildGenerator(const BuildGenerator &buildGenerator)
|
||||
{
|
||||
m_buildGenerator = buildGenerator;
|
||||
}
|
||||
|
||||
void BuildConfigurationFactory::setIssueReporter(const IssueReporter &issueReporter)
|
||||
{
|
||||
m_issueReporter = issueReporter;
|
||||
|
||||
@@ -163,8 +163,9 @@ public:
|
||||
const QString &projectPath, const QString &buildDir) const;
|
||||
|
||||
protected:
|
||||
virtual QList<BuildInfo>
|
||||
availableBuilds(const Kit *k, const Utils::FilePath &projectPath, bool forSetup) const = 0;
|
||||
using BuildGenerator
|
||||
= std::function<QList<BuildInfo>(const Kit *, const Utils::FilePath &, bool)>;
|
||||
void setBuildGenerator(const BuildGenerator &buildGenerator);
|
||||
|
||||
bool supportsTargetDeviceType(Core::Id id) const;
|
||||
void setSupportedProjectType(Core::Id id);
|
||||
@@ -191,6 +192,7 @@ private:
|
||||
QList<Core::Id> m_supportedTargetDeviceTypes;
|
||||
QString m_supportedProjectMimeTypeName;
|
||||
IssueReporter m_issueReporter;
|
||||
BuildGenerator m_buildGenerator;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -422,39 +422,38 @@ QbsBuildConfigurationFactory::QbsBuildConfigurationFactory()
|
||||
return version ? version->reportIssues(projectPath, buildDir)
|
||||
: Tasks();
|
||||
});
|
||||
}
|
||||
|
||||
QList<BuildInfo> QbsBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
QList<BuildInfo> result;
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
QList<BuildInfo> result;
|
||||
|
||||
if (forSetup) {
|
||||
if (forSetup) {
|
||||
|
||||
BuildInfo info = createBuildInfo(k, BuildConfiguration::Debug);
|
||||
//: The name of the debug build configuration created by default for a qbs project.
|
||||
info.displayName = tr("Debug");
|
||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||
info.buildDirectory
|
||||
= defaultBuildDirectory(projectPath, k, tr("Debug", "Shadow build directory suffix"),
|
||||
info.buildType);
|
||||
result << info;
|
||||
BuildInfo info = createBuildInfo(k, BuildConfiguration::Debug);
|
||||
//: The name of the debug build configuration created by default for a qbs project.
|
||||
info.displayName = tr("Debug");
|
||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||
info.buildDirectory
|
||||
= defaultBuildDirectory(projectPath, k, tr("Debug", "Shadow build directory suffix"),
|
||||
info.buildType);
|
||||
result << info;
|
||||
|
||||
info = createBuildInfo(k, BuildConfiguration::Release);
|
||||
//: The name of the release build configuration created by default for a qbs project.
|
||||
info.displayName = tr("Release");
|
||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||
info.buildDirectory
|
||||
= defaultBuildDirectory(projectPath, k, tr("Release", "Shadow build directory suffix"),
|
||||
info.buildType);
|
||||
result << info;
|
||||
info = createBuildInfo(k, BuildConfiguration::Release);
|
||||
//: The name of the release build configuration created by default for a qbs project.
|
||||
info.displayName = tr("Release");
|
||||
//: Non-ASCII characters in directory suffix may cause build issues.
|
||||
info.buildDirectory
|
||||
= defaultBuildDirectory(projectPath, k, tr("Release", "Shadow build directory suffix"),
|
||||
info.buildType);
|
||||
result << info;
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
result << createBuildInfo(k, BuildConfiguration::Debug);
|
||||
result << createBuildInfo(k, BuildConfiguration::Debug);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
BuildInfo QbsBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
||||
|
||||
@@ -102,9 +102,6 @@ class QbsBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationF
|
||||
public:
|
||||
QbsBuildConfigurationFactory();
|
||||
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds
|
||||
(const ProjectExplorer::Kit *k, const Utils::FilePath &projectPath, bool forSetup) const override;
|
||||
|
||||
private:
|
||||
ProjectExplorer::BuildInfo createBuildInfo(const ProjectExplorer::Kit *k,
|
||||
ProjectExplorer::BuildConfiguration::BuildType type) const;
|
||||
|
||||
@@ -711,6 +711,31 @@ QmakeBuildConfigurationFactory::QmakeBuildConfigurationFactory()
|
||||
}
|
||||
return issues;
|
||||
});
|
||||
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
QList<BuildInfo> result;
|
||||
|
||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(k);
|
||||
|
||||
if (forSetup && (!qtVersion || !qtVersion->isValid()))
|
||||
return result;
|
||||
|
||||
const auto addBuild = [&](BuildConfiguration::BuildType buildType) {
|
||||
BuildInfo info = createBuildInfo(k, projectPath, buildType);
|
||||
if (!forSetup) {
|
||||
info.displayName.clear(); // ask for a name
|
||||
info.buildDirectory.clear(); // This depends on the displayName
|
||||
}
|
||||
result << info;
|
||||
};
|
||||
|
||||
addBuild(BuildConfiguration::Debug);
|
||||
addBuild(BuildConfiguration::Release);
|
||||
if (qtVersion && qtVersion->qtVersion().majorVersion > 4)
|
||||
addBuild(BuildConfiguration::Profile);
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
||||
@@ -779,32 +804,6 @@ BuildInfo QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
||||
return info;
|
||||
}
|
||||
|
||||
QList<BuildInfo> QmakeBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
QList<BuildInfo> result;
|
||||
|
||||
BaseQtVersion *qtVersion = QtKitAspect::qtVersion(k);
|
||||
|
||||
if (forSetup && (!qtVersion || !qtVersion->isValid()))
|
||||
return {};
|
||||
|
||||
const auto addBuild = [&](BuildConfiguration::BuildType buildType) {
|
||||
BuildInfo info = createBuildInfo(k, projectPath, buildType);
|
||||
if (!forSetup) {
|
||||
info.displayName.clear(); // ask for a name
|
||||
info.buildDirectory.clear(); // This depends on the displayName
|
||||
}
|
||||
result << info;
|
||||
};
|
||||
|
||||
addBuild(BuildConfiguration::Debug);
|
||||
addBuild(BuildConfiguration::Release);
|
||||
if (qtVersion && qtVersion->qtVersion().majorVersion > 4)
|
||||
addBuild(BuildConfiguration::Profile);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BuildConfiguration::BuildType QmakeBuildConfiguration::buildType() const
|
||||
{
|
||||
if (qmakeBuildConfiguration() & BaseQtVersion::DebugBuild)
|
||||
|
||||
@@ -158,9 +158,6 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeBuildConfigurationFactory : public Project
|
||||
public:
|
||||
QmakeBuildConfigurationFactory();
|
||||
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *k,
|
||||
const Utils::FilePath &projectPath,
|
||||
bool forSetup) const override;
|
||||
private:
|
||||
ProjectExplorer::BuildInfo createBuildInfo(const ProjectExplorer::Kit *k, const Utils::FilePath &projectPath,
|
||||
ProjectExplorer::BuildConfiguration::BuildType type) const;
|
||||
|
||||
@@ -68,13 +68,12 @@ public:
|
||||
bool needsConfiguration() const final { return false; }
|
||||
};
|
||||
|
||||
class DummyBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationFactory
|
||||
class DummyBuildConfigurationFactory : public BuildConfigurationFactory
|
||||
{
|
||||
public:
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *,
|
||||
const FilePath &, bool) const final
|
||||
DummyBuildConfigurationFactory()
|
||||
{
|
||||
return {};
|
||||
setBuildGenerator([](const Kit *, const FilePath &, bool) { return QList<BuildInfo>{}; });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user