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:
Thorbjørn Lindeijer
2009-01-21 15:52:34 +01:00
parent f73861d458
commit 6adecf3767
39 changed files with 107 additions and 143 deletions

View File

@@ -37,7 +37,6 @@
#include "texteditorplugin.h"
#include "texteditoractionhandler.h"
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/editormanager/editormanager.h>
@@ -67,8 +66,7 @@ QString PlainTextEditorFactory::kind() const
Core::IFile *PlainTextEditorFactory::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;
}