summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cmakeprojectmanager')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditor.cpp6
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeeditorfactory.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp6
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp14
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.h6
6 files changed, 19 insertions, 19 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
index 27057cce2e..a0586f9168 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
@@ -79,7 +79,7 @@ Core::Id CMakeEditor::id() const
void CMakeEditor::markAsChanged()
{
- if (!file()->isModified())
+ if (!document()->isModified())
return;
if (m_infoBarShown)
return;
@@ -87,7 +87,7 @@ void CMakeEditor::markAsChanged()
Core::InfoBarEntry info(QLatin1String("CMakeEditor.RunCMake"),
tr("Changes to cmake files are shown in the project tree after building."));
info.setCustomButtonInfo(tr("Build now"), this, SLOT(build()));
- file()->infoBar()->addInfo(info);
+ document()->infoBar()->addInfo(info);
}
void CMakeEditor::build()
@@ -97,7 +97,7 @@ void CMakeEditor::build()
foreach (ProjectExplorer::Project *p, projects) {
CMakeProject *cmakeProject = qobject_cast<CMakeProject *>(p);
if (cmakeProject) {
- if (cmakeProject->isProjectFile(file()->fileName())) {
+ if (cmakeProject->isProjectFile(document()->fileName())) {
ProjectExplorer::ProjectExplorerPlugin::instance()->buildProject(cmakeProject);
break;
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp b/src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
index 5f12897c5f..c5b8ee9053 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
@@ -58,10 +58,10 @@ QString CMakeEditorFactory::displayName() const
return tr(CMakeProjectManager::Constants::CMAKE_EDITOR_DISPLAY_NAME);
}
-Core::IFile *CMakeEditorFactory::open(const QString &fileName)
+Core::IDocument *CMakeEditorFactory::open(const QString &fileName)
{
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id());
- return iface ? iface->file() : 0;
+ return iface ? iface->document() : 0;
}
Core::IEditor *CMakeEditorFactory::createEditor(QWidget *parent)
diff --git a/src/plugins/cmakeprojectmanager/cmakeeditorfactory.h b/src/plugins/cmakeprojectmanager/cmakeeditorfactory.h
index 7a61cf10ff..e23a654808 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditorfactory.h
+++ b/src/plugins/cmakeprojectmanager/cmakeeditorfactory.h
@@ -57,7 +57,7 @@ public:
QStringList mimeTypes() const;
Core::Id id() const;
QString displayName() const;
- Core::IFile *open(const QString &fileName);
+ Core::IDocument *open(const QString &fileName);
Core::IEditor *createEditor(QWidget *parent);
private:
diff --git a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp
index f2a71d3ad7..50cdf33bf3 100644
--- a/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakelocatorfilter.cpp
@@ -75,8 +75,8 @@ QList<Locator::FilterEntry> CMakeLocatorFilter::matchesFor(QFutureInterface<Loca
if (cmakeProject) {
foreach (CMakeBuildTarget ct, cmakeProject->buildTargets()) {
if (ct.title.contains(entry)) {
- Locator::FilterEntry entry(this, ct.title, cmakeProject->file()->fileName());
- entry.extraInfo = cmakeProject->file()->fileName();
+ Locator::FilterEntry entry(this, ct.title, cmakeProject->document()->fileName());
+ entry.extraInfo = cmakeProject->document()->fileName();
result.append(entry);
}
}
@@ -95,7 +95,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->file()->fileName() == selection.internalData.toString())
+ if (cmakeProject && cmakeProject->document()->fileName() == selection.internalData.toString())
break;
cmakeProject = 0;
}
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index d6eb593612..d5aabb4531 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -197,8 +197,8 @@ bool CMakeProject::parseCMakeLists()
return false;
foreach (Core::IEditor *editor, Core::EditorManager::instance()->openedEditors())
- if (isProjectFile(editor->file()->fileName()))
- editor->file()->infoBar()->removeInfo(QLatin1String("CMakeEditor.RunCMake"));
+ if (isProjectFile(editor->document()->fileName()))
+ editor->document()->infoBar()->removeInfo(QLatin1String("CMakeEditor.RunCMake"));
// Find cbp file
CMakeBuildConfiguration *activeBC = activeTarget()->activeBuildConfiguration();
@@ -481,7 +481,7 @@ QString CMakeProject::id() const
return QLatin1String(Constants::CMAKEPROJECT_ID);
}
-Core::IFile *CMakeProject::file() const
+Core::IDocument *CMakeProject::document() const
{
return m_file;
}
@@ -692,7 +692,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->file()->fileName(), contents);
+ updateCodeModelSupportFromEditor(m_lastEditor->document()->fileName(), contents);
m_dirtyUic = false;
}
}
@@ -713,7 +713,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->file()->fileName(), contents);
+ updateCodeModelSupportFromEditor(m_lastEditor->document()->fileName(), contents);
m_dirtyUic = false;
}
}
@@ -744,7 +744,7 @@ void CMakeProject::buildStateChanged(ProjectExplorer::Project *project)
// CMakeFile
CMakeFile::CMakeFile(CMakeProject *parent, QString fileName)
- : Core::IFile(parent), m_project(parent), m_fileName(fileName)
+ : Core::IDocument(parent), m_project(parent), m_fileName(fileName)
{
}
@@ -797,7 +797,7 @@ void CMakeFile::rename(const QString &newName)
// Can't happen....
}
-Core::IFile::ReloadBehavior CMakeFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
+Core::IDocument::ReloadBehavior CMakeFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
{
Q_UNUSED(state)
Q_UNUSED(type)
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h
index 24bee0b1b1..f5bb915b80 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.h
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.h
@@ -43,7 +43,7 @@
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/buildconfiguration.h>
-#include <coreplugin/ifile.h>
+#include <coreplugin/idocument.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
@@ -81,7 +81,7 @@ public:
QString displayName() const;
QString id() const;
- Core::IFile *file() const;
+ Core::IDocument *document() const;
CMakeManager *projectManager() const;
CMakeTarget *activeTarget() const;
@@ -193,7 +193,7 @@ private:
QString m_compiler;
};
-class CMakeFile : public Core::IFile
+class CMakeFile : public Core::IDocument
{
Q_OBJECT
public: