Rename IDocument::fileName --> filePath

That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Eike Ziller
2013-07-04 13:30:26 +02:00
parent cee1602253
commit dd43d9908f
118 changed files with 326 additions and 326 deletions

View File

@@ -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()->fileName(),
m_buildDirectory = project->shadowBuildDirectory(project->document()->filePath(),
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()->fileName(),
info.buildDirectory = project->shadowBuildDirectory(project->document()->filePath(),
parent->kit(),
buildConfigurationName);
info.kit = parent->kit();

View File

@@ -99,7 +99,7 @@ void CMakeEditor::build()
foreach (ProjectExplorer::Project *p, projects) {
CMakeProject *cmakeProject = qobject_cast<CMakeProject *>(p);
if (cmakeProject) {
if (cmakeProject->isProjectFile(document()->fileName())) {
if (cmakeProject->isProjectFile(document()->filePath())) {
ProjectExplorer::ProjectExplorerPlugin::instance()->buildProject(cmakeProject);
break;
}
@@ -219,7 +219,7 @@ CMakeEditorWidget::Link CMakeEditorWidget::findLinkAt(const QTextCursor &cursor,
// TODO: Resolve variables
QDir dir(QFileInfo(editorDocument()->fileName()).absolutePath());
QDir dir(QFileInfo(editorDocument()->filePath()).absolutePath());
QString fileName = dir.filePath(buffer);
QFileInfo fi(fileName);
if (fi.exists()) {
@@ -250,12 +250,12 @@ CMakeDocument::CMakeDocument()
QString CMakeDocument::defaultPath() const
{
QFileInfo fi(fileName());
QFileInfo fi(filePath());
return fi.absolutePath();
}
QString CMakeDocument::suggestedFileName() const
{
QFileInfo fi(fileName());
QFileInfo fi(filePath());
return fi.fileName();
}

View File

@@ -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()->fileName());
Locator::FilterEntry entry(this, ct.title, cmakeProject->document()->filePath());
entry.extraInfo = FileUtils::shortNativePath(
FileName::fromString(cmakeProject->document()->fileName()));
FileName::fromString(cmakeProject->document()->filePath()));
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()->fileName() == selection.internalData.toString())
if (cmakeProject && cmakeProject->document()->filePath() == selection.internalData.toString())
break;
cmakeProject = 0;
}

View File

@@ -222,7 +222,7 @@ bool CMakeProject::parseCMakeLists()
CMakeBuildConfiguration *activeBC = static_cast<CMakeBuildConfiguration *>(activeTarget()->activeBuildConfiguration());
foreach (Core::IEditor *editor, Core::EditorManager::instance()->openedEditors())
if (isProjectFile(editor->document()->fileName()))
if (isProjectFile(editor->document()->filePath()))
editor->document()->infoBar()->removeInfo(Core::Id("CMakeEditor.RunCMake"));
// Find cbp file
@@ -845,7 +845,7 @@ void CMakeProject::editorChanged(Core::IEditor *editor)
disconnect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirtyUic) {
const QString contents = formWindowEditorContents(m_lastEditor);
updateCodeModelSupportFromEditor(m_lastEditor->document()->fileName(), contents);
updateCodeModelSupportFromEditor(m_lastEditor->document()->filePath(), contents);
m_dirtyUic = false;
}
}
@@ -866,7 +866,7 @@ void CMakeProject::editorAboutToClose(Core::IEditor *editor)
disconnect(m_lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged()));
if (m_dirtyUic) {
const QString contents = formWindowEditorContents(m_lastEditor);
updateCodeModelSupportFromEditor(m_lastEditor->document()->fileName(), contents);
updateCodeModelSupportFromEditor(m_lastEditor->document()->filePath(), contents);
m_dirtyUic = false;
}
}
@@ -899,7 +899,7 @@ void CMakeProject::buildStateChanged(ProjectExplorer::Project *project)
CMakeFile::CMakeFile(CMakeProject *parent, QString fileName)
: Core::IDocument(parent), m_project(parent)
{
setFileName(fileName);
setFilePath(fileName);
}
bool CMakeFile::save(QString *errorString, const QString &fileName, bool autoSave)