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:
@@ -37,7 +37,6 @@
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
#include "profileeditor.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/fileiconprovider.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <texteditor/texteditoractionhandler.h>
|
||||
@@ -74,8 +73,7 @@ QString ProFileEditorFactory::kind() const
|
||||
|
||||
Core::IFile *ProFileEditorFactory::open(const QString &fileName)
|
||||
{
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
Core::IEditor *iface = core->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