diff options
Diffstat (limited to 'src')
17 files changed, 37 insertions, 30 deletions
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp index 57f593c37f..9a9afa158a 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp @@ -97,9 +97,9 @@ AutotoolsBuildConfigurationFactory::AutotoolsBuildConfigurationFactory() setSupportedProjectMimeTypeName(Constants::MAKEFILE_MIMETYPE); } -QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath) const { - return {createBuildInfo(parent->kit(), parent->project()->projectDirectory())}; + return {createBuildInfo(k, projectPath)}; } QList<BuildInfo> AutotoolsBuildConfigurationFactory::availableSetups(const Kit *k, const FilePath &projectPath) const diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h index a77b0293f8..f5e83c8279 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h @@ -53,7 +53,8 @@ public: AutotoolsBuildConfigurationFactory(); private: - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override; + 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; diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index 9ef5db87d3..74e643bfbe 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -481,13 +481,14 @@ BuildConfiguration::BuildType CMakeBuildConfigurationFactory::cmakeBuildTypeToBu return BuildConfiguration::Unknown; } -QList<BuildInfo> CMakeBuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo> + CMakeBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath) const { QList<BuildInfo> result; for (int type = BuildTypeNone; type != BuildTypeLast; ++type) { - result << createBuildInfo(parent->kit(), - parent->project()->projectDirectory().toString(), + result << createBuildInfo(k, + projectPath.toString(), BuildType(type)); } return result; diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h index 5f725780a9..5c67908070 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h @@ -134,7 +134,8 @@ public: static BuildType buildTypeFromByteArray(const QByteArray &in); static ProjectExplorer::BuildConfiguration::BuildType cmakeBuildTypeToBuildType(const BuildType &in); - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override; + 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; diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp index f589d9a40a..95cc20b2c0 100644 --- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp +++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.cpp @@ -541,13 +541,12 @@ static QList<ProjectExplorer::BuildInfo> defaultBuildInfos( return buildInfos; } -QList<ProjectExplorer::BuildInfo> CompilationDatabaseBuildConfigurationFactory::availableBuilds( - const ProjectExplorer::Target * /*parent*/) const +QList<BuildInfo> CompilationDatabaseBuildConfigurationFactory::availableBuilds(const Kit *, const Utils::FilePath &) const { return defaultBuildInfos(this, tr("Release")); } -QList<ProjectExplorer::BuildInfo> CompilationDatabaseBuildConfigurationFactory::availableSetups(const ProjectExplorer::Kit * /*k*/, const Utils::FilePath & /*projectPath*/) const +QList<BuildInfo> CompilationDatabaseBuildConfigurationFactory::availableSetups(const Kit *, const Utils::FilePath &) const { return defaultBuildInfos(this, tr("Release")); } diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h index 2865b331ef..84754e3dbf 100644 --- a/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h +++ b/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseproject.h @@ -105,7 +105,7 @@ public: CompilationDatabaseBuildConfigurationFactory(); QList<ProjectExplorer::BuildInfo> availableBuilds( - const ProjectExplorer::Target *parent) const override; + const ProjectExplorer::Kit *k, const Utils::FilePath &projectPath) const override; QList<ProjectExplorer::BuildInfo> availableSetups( const ProjectExplorer::Kit *k, const Utils::FilePath &projectPath) const override; }; diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp index 0f367faf0c..3ed467108f 100644 --- a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp +++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp @@ -87,9 +87,10 @@ GenericBuildConfigurationFactory::GenericBuildConfigurationFactory() GenericBuildConfigurationFactory::~GenericBuildConfigurationFactory() = default; -QList<BuildInfo> GenericBuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo> + GenericBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath) const { - return {createBuildInfo(parent->kit(), parent->project()->projectDirectory())}; + return {createBuildInfo(k, projectPath)}; } QList<BuildInfo> diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.h b/src/plugins/genericprojectmanager/genericbuildconfiguration.h index ae46cfcf34..facb74f178 100644 --- a/src/plugins/genericprojectmanager/genericbuildconfiguration.h +++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.h @@ -53,7 +53,8 @@ public: ~GenericBuildConfigurationFactory() override; private: - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override; + 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; diff --git a/src/plugins/nim/project/nimbuildconfiguration.cpp b/src/plugins/nim/project/nimbuildconfiguration.cpp index c5874ec6ec..2d49e8626d 100644 --- a/src/plugins/nim/project/nimbuildconfiguration.cpp +++ b/src/plugins/nim/project/nimbuildconfiguration.cpp @@ -155,11 +155,11 @@ NimBuildConfigurationFactory::NimBuildConfigurationFactory() setSupportedProjectMimeTypeName(Constants::C_NIM_PROJECT_MIMETYPE); } -QList<BuildInfo> NimBuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo> NimBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &) const { QList<BuildInfo> result; for (auto buildType : {BuildConfiguration::Debug, BuildConfiguration::Release}) - result.push_back(createBuildInfo(parent->kit(), buildType)); + result.push_back(createBuildInfo(k, buildType)); return result; } diff --git a/src/plugins/nim/project/nimbuildconfiguration.h b/src/plugins/nim/project/nimbuildconfiguration.h index 2c62fc0ca6..ba750d6776 100644 --- a/src/plugins/nim/project/nimbuildconfiguration.h +++ b/src/plugins/nim/project/nimbuildconfiguration.h @@ -63,7 +63,8 @@ public: NimBuildConfigurationFactory(); private: - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override; + 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; diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp index 1457ee5cf4..0bea346bf0 100644 --- a/src/plugins/projectexplorer/buildconfiguration.cpp +++ b/src/plugins/projectexplorer/buildconfiguration.cpp @@ -416,7 +416,7 @@ const Tasks BuildConfigurationFactory::reportIssues(ProjectExplorer::Kit *kit, c const QList<BuildInfo> BuildConfigurationFactory::allAvailableBuilds(const Target *parent) const { - return availableBuilds(parent); + return availableBuilds(parent->kit(), parent->project()->projectFilePath()); } const QList<BuildInfo> diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h index cd9e0db785..d2edce03cd 100644 --- a/src/plugins/projectexplorer/buildconfiguration.h +++ b/src/plugins/projectexplorer/buildconfiguration.h @@ -157,7 +157,8 @@ public: const QString &projectPath, const QString &buildDir) const; protected: - virtual QList<BuildInfo> availableBuilds(const Target *parent) const = 0; + virtual QList<BuildInfo> + availableBuilds(const Kit *k, const Utils::FilePath &projectPath) const = 0; virtual QList<BuildInfo> availableSetups(const Kit *k, const Utils::FilePath &projectPath) const = 0; diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp index 32895022dc..3ebed18a1c 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp @@ -382,9 +382,10 @@ BuildInfo QbsBuildConfigurationFactory::createBuildInfo(const Kit *k, return info; } -QList<BuildInfo> QbsBuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo> + QbsBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &) const { - return {createBuildInfo(parent->kit(), BuildConfiguration::Debug)}; + return {createBuildInfo(k, BuildConfiguration::Debug)}; } QList<BuildInfo> diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.h b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.h index 91e709e044..7f3f96c285 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.h +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.h @@ -92,7 +92,8 @@ class QbsBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationF public: QbsBuildConfigurationFactory(); - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override; + 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; diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index df053e1521..1285cbc8ce 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -665,15 +665,12 @@ static const QList<BuildConfiguration::BuildType> availableBuildTypes(const Base return types; } -QList<BuildInfo> QmakeBuildConfigurationFactory::availableBuilds(const Target *parent) const +QList<BuildInfo> QmakeBuildConfigurationFactory::availableBuilds(const Kit *k, const FilePath &projectPath) const { QList<BuildInfo> result; - const FilePath projectFilePath = parent->project()->projectFilePath(); - - for (BuildConfiguration::BuildType buildType : - availableBuildTypes(QtKitAspect::qtVersion(parent->kit()))) { - BuildInfo info = createBuildInfo(parent->kit(), projectFilePath, buildType); + for (BuildConfiguration::BuildType buildType : availableBuildTypes(QtKitAspect::qtVersion(k))) { + BuildInfo info = createBuildInfo(k, projectPath, buildType); info.displayName.clear(); // ask for a name info.buildDirectory.clear(); // This depends on the displayName result << info; diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h index e5a11b6d4a..867f72afdb 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h @@ -149,7 +149,8 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeBuildConfigurationFactory : public Project public: QmakeBuildConfigurationFactory(); - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override; + 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; private: diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp index 7d681994da..049c84d47c 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp @@ -71,7 +71,8 @@ public: class DummyBuildConfigurationFactory : public ProjectExplorer::BuildConfigurationFactory { public: - QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *) const final + QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Kit *, + const FilePath &) const final { return {}; } |