forked from qt-creator/qt-creator
ProjectExplorer etc: More FilePath usage
Mostly for project files. Change-Id: Icb6059f80758865e42cc9f9c092ec6782770dfd7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -267,7 +267,7 @@ FilePath CMakeBuildConfiguration::shadowBuildDirectory(const FilePath &projectFi
|
||||
return FilePath();
|
||||
|
||||
const QString projectName = projectFilePath.parentDir().fileName();
|
||||
ProjectMacroExpander expander(projectFilePath.toString(), projectName, k, bcName, buildType);
|
||||
ProjectMacroExpander expander(projectFilePath, projectName, k, bcName, buildType);
|
||||
QDir projectDir = QDir(Project::projectDirectory(projectFilePath).toString());
|
||||
QString buildPath = expander.expand(ProjectExplorerPlugin::buildDirectoryTemplate());
|
||||
buildPath.replace(" ", "-");
|
||||
@@ -493,17 +493,17 @@ QList<BuildInfo> CMakeBuildConfigurationFactory::availableBuilds(const Target *p
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<BuildInfo> CMakeBuildConfigurationFactory::availableSetups(const Kit *k, const QString &projectPath) const
|
||||
QList<BuildInfo>
|
||||
CMakeBuildConfigurationFactory::availableSetups(const Kit *k, const FilePath &projectPath) const
|
||||
{
|
||||
QList<BuildInfo> result;
|
||||
const FilePath projectPathName = FilePath::fromString(projectPath);
|
||||
for (int type = BuildTypeDebug; type != BuildTypeLast; ++type) {
|
||||
BuildInfo info = createBuildInfo(k,
|
||||
ProjectExplorer::Project::projectDirectory(projectPathName).toString(),
|
||||
ProjectExplorer::Project::projectDirectory(projectPath).toString(),
|
||||
BuildType(type));
|
||||
info.displayName = info.typeName;
|
||||
info.buildDirectory
|
||||
= CMakeBuildConfiguration::shadowBuildDirectory(projectPathName, k,
|
||||
= CMakeBuildConfiguration::shadowBuildDirectory(projectPath, k,
|
||||
info.displayName, info.buildType);
|
||||
result << info;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
|
||||
QList<ProjectExplorer::BuildInfo> availableBuilds(const ProjectExplorer::Target *parent) const override;
|
||||
QList<ProjectExplorer::BuildInfo> availableSetups(const ProjectExplorer::Kit *k,
|
||||
const QString &projectPath) const override;
|
||||
const Utils::FilePath &projectPath) const override;
|
||||
|
||||
private:
|
||||
ProjectExplorer::BuildInfo createBuildInfo(const ProjectExplorer::Kit *k,
|
||||
|
||||
@@ -349,7 +349,7 @@ const QList<BuildInfo> CMakeProjectImporter::buildInfoListForKit(const Kit *k, v
|
||||
{
|
||||
auto data = static_cast<const DirectoryData *>(directoryData);
|
||||
auto factory = qobject_cast<CMakeBuildConfigurationFactory *>(
|
||||
BuildConfigurationFactory::find(k, projectFilePath().toString()));
|
||||
BuildConfigurationFactory::find(k, projectFilePath()));
|
||||
if (!factory)
|
||||
return {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user