summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index bf676e26e3..08445b8ae2 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -665,7 +665,6 @@ CppModelManager::CppModelManager(QObject *parent)
m_revision = 0;
m_synchronizer.setCancelOnWait(true);
- m_core = Core::ICore::instance(); // FIXME
m_dirty = true;
ProjectExplorer::ProjectExplorerPlugin *pe =
@@ -700,10 +699,10 @@ CppModelManager::CppModelManager(QObject *parent)
this, SLOT(onExtraDiagnosticsUpdated(QString)));
// Listen for editor closed and opened events so that we can keep track of changing files
- connect(m_core->editorManager(), SIGNAL(editorOpened(Core::IEditor *)),
+ connect(Core::ICore::editorManager(), SIGNAL(editorOpened(Core::IEditor *)),
this, SLOT(editorOpened(Core::IEditor *)));
- connect(m_core->editorManager(), SIGNAL(editorAboutToClose(Core::IEditor *)),
+ connect(Core::ICore::editorManager(), SIGNAL(editorAboutToClose(Core::IEditor *)),
this, SLOT(editorAboutToClose(Core::IEditor *)));
}
@@ -901,8 +900,8 @@ QFuture<void> CppModelManager::refreshSourceFiles(const QStringList &sourceFiles
m_synchronizer.addFuture(result);
if (sourceFiles.count() > 1) {
- m_core->progressManager()->addTask(result, tr("Parsing"),
- CppTools::Constants::TASK_INDEX);
+ Core::ICore::progressManager()->addTask(result, tr("Parsing"),
+ CppTools::Constants::TASK_INDEX);
}
return result;
@@ -988,7 +987,7 @@ void CppModelManager::updateEditor(Document::Ptr doc)
{
const QString fileName = doc->fileName();
- QList<Core::IEditor *> openedEditors = m_core->editorManager()->openedEditors();
+ QList<Core::IEditor *> openedEditors = Core::ICore::editorManager()->openedEditors();
foreach (Core::IEditor *editor, openedEditors) {
if (editor->file()->fileName() == fileName) {
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor *>(editor);
@@ -1177,8 +1176,8 @@ void CppModelManager::onAboutToRemoveProject(ProjectExplorer::Project *project)
void CppModelManager::onAboutToUnloadSession()
{
- if (m_core->progressManager()) {
- m_core->progressManager()->cancelTasks(CppTools::Constants::TASK_INDEX);
+ if (Core::ProgressManager *pm = Core::ICore::progressManager()) {
+ pm->cancelTasks(CppTools::Constants::TASK_INDEX);
}
do {
QMutexLocker locker(&mutex);
@@ -1196,7 +1195,7 @@ void CppModelManager::parse(QFutureInterface<void> &future,
if (files.isEmpty())
return;
- const Core::MimeDatabase *mimeDb = Core::ICore::instance()->mimeDatabase();
+ const Core::MimeDatabase *mimeDb = Core::ICore::mimeDatabase();
Core::MimeType cSourceTy = mimeDb->findByType(QLatin1String("text/x-csrc"));
Core::MimeType cppSourceTy = mimeDb->findByType(QLatin1String("text/x-c++src"));
Core::MimeType mSourceTy = mimeDb->findByType(QLatin1String("text/x-objcsrc"));