forked from qt-creator/qt-creator
Introduce Project::projectFilePath()
Use it instead of retrieving this information from the document. Change-Id: I809fcb2daf59021cf503c371a5d40d75d7448796 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -52,7 +52,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent
|
||||
BuildConfiguration(parent, Core::Id(Constants::CMAKE_BC_ID)), m_useNinja(false)
|
||||
{
|
||||
CMakeProject *project = static_cast<CMakeProject *>(parent->project());
|
||||
m_buildDirectory = project->shadowBuildDirectory(project->document()->filePath(),
|
||||
m_buildDirectory = project->shadowBuildDirectory(project->projectFilePath(),
|
||||
parent->kit(),
|
||||
displayName());
|
||||
}
|
||||
@@ -181,7 +181,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::create(ProjectExplorer:
|
||||
info.sourceDirectory = project->projectDirectory();
|
||||
info.environment = Utils::Environment::systemEnvironment();
|
||||
parent->kit()->addToEnvironment(info.environment);
|
||||
info.buildDirectory = project->shadowBuildDirectory(project->document()->filePath(),
|
||||
info.buildDirectory = project->shadowBuildDirectory(project->projectFilePath(),
|
||||
parent->kit(),
|
||||
buildConfigurationName);
|
||||
info.kit = parent->kit();
|
||||
|
||||
@@ -76,9 +76,9 @@ QList<Locator::FilterEntry> CMakeLocatorFilter::matchesFor(QFutureInterface<Loca
|
||||
if (cmakeProject) {
|
||||
foreach (const CMakeBuildTarget &ct, cmakeProject->buildTargets()) {
|
||||
if (ct.title.contains(entry)) {
|
||||
Locator::FilterEntry entry(this, ct.title, cmakeProject->document()->filePath());
|
||||
Locator::FilterEntry entry(this, ct.title, cmakeProject->projectFilePath());
|
||||
entry.extraInfo = FileUtils::shortNativePath(
|
||||
FileName::fromString(cmakeProject->document()->filePath()));
|
||||
FileName::fromString(cmakeProject->projectFilePath()));
|
||||
result.append(entry);
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ void CMakeLocatorFilter::accept(Locator::FilterEntry selection) const
|
||||
ProjectExplorer::ProjectExplorerPlugin::instance()->session()->projects();
|
||||
foreach (ProjectExplorer::Project *p, projects) {
|
||||
cmakeProject = qobject_cast<CMakeProject *>(p);
|
||||
if (cmakeProject && cmakeProject->document()->filePath() == selection.internalData.toString())
|
||||
if (cmakeProject && cmakeProject->projectFilePath() == selection.internalData.toString())
|
||||
break;
|
||||
cmakeProject = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user