forked from qt-creator/qt-creator
Avoid going through ICore when it's not necessary
Many singletons have their own instance() method, in which case there is no need to use ICore::instance() to get access to them.
This commit is contained in:
@@ -43,7 +43,6 @@
|
||||
#include "codecselector.h"
|
||||
|
||||
#ifndef TEXTEDITOR_STANDALONE
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/manhattanstyle.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
@@ -132,7 +131,7 @@ ITextEditor *BaseTextEditor::openEditorAt(const QString &fileName,
|
||||
int column,
|
||||
const QString &editorKind)
|
||||
{
|
||||
Core::EditorManager *editorManager = Core::ICore::instance()->editorManager();
|
||||
Core::EditorManager *editorManager = Core::EditorManager::instance();
|
||||
editorManager->addCurrentPositionToNavigationHistory(true);
|
||||
Core::IEditor *editor = editorManager->openEditor(fileName, editorKind, true);
|
||||
TextEditor::ITextEditor *texteditor = qobject_cast<TextEditor::ITextEditor *>(editor);
|
||||
|
||||
Reference in New Issue
Block a user