Project: Use Utils::FileName as return type for projectFilePath()

Change-Id: If304d5e95cd9ac714100abaae35d60e3e1050eb2
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2014-05-02 12:22:58 +02:00
parent faab380cc1
commit 8d5e4b32a8
30 changed files with 69 additions and 70 deletions

View File

@@ -56,7 +56,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent
BuildConfiguration(parent, Core::Id(Constants::CMAKE_BC_ID)), m_useNinja(false)
{
CMakeProject *project = static_cast<CMakeProject *>(parent->project());
setBuildDirectory(Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath(),
setBuildDirectory(Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath().toString(),
parent->kit(),
displayName())));
}
@@ -169,7 +169,7 @@ ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(Proj
if (copy.buildDirectory.isEmpty())
copy.buildDirectory
= Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath(),
= Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath().toString(),
parent->kit(),
copy.displayName));

View File

@@ -74,9 +74,8 @@ QList<Core::LocatorFilterEntry> CMakeLocatorFilter::matchesFor(QFutureInterface<
if (cmakeProject) {
foreach (const CMakeBuildTarget &ct, cmakeProject->buildTargets()) {
if (ct.title.contains(entry)) {
Core::LocatorFilterEntry entry(this, ct.title, cmakeProject->projectFilePath());
entry.extraInfo = FileUtils::shortNativePath(
FileName::fromString(cmakeProject->projectFilePath()));
Core::LocatorFilterEntry entry(this, ct.title, cmakeProject->projectFilePath().toString());
entry.extraInfo = FileUtils::shortNativePath(cmakeProject->projectFilePath());
result.append(entry);
}
}
@@ -93,7 +92,7 @@ void CMakeLocatorFilter::accept(Core::LocatorFilterEntry selection) const
foreach (Project *p, SessionManager::projects()) {
cmakeProject = qobject_cast<CMakeProject *>(p);
if (cmakeProject && cmakeProject->projectFilePath() == selection.internalData.toString())
if (cmakeProject && cmakeProject->projectFilePath().toString() == selection.internalData.toString())
break;
cmakeProject = 0;
}

View File

@@ -340,7 +340,7 @@ bool CMakeProject::parseCMakeLists()
CppTools::ProjectPart::Ptr part(new CppTools::ProjectPart);
part->project = this;
part->displayName = displayName();
part->projectFile = projectFilePath();
part->projectFile = projectFilePath().toString();
// This explicitly adds -I. to the include paths
part->includePaths += projectDirectory();