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:
@@ -35,7 +35,6 @@
|
||||
#include "vcsbaseplugin.h"
|
||||
#include "vcsbaseeditor.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
@@ -83,7 +82,7 @@ QString BaseVCSEditorFactory::kind() const
|
||||
|
||||
Core::IFile *BaseVCSEditorFactory::open(const QString &fileName)
|
||||
{
|
||||
Core::IEditor *iface = Core::ICore::instance()->editorManager()->openEditor(fileName, kind());
|
||||
Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, kind());
|
||||
return iface ? iface->file() : 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user