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

@@ -35,7 +35,6 @@
#include <coreplugin/editormanager/editormanager.h>
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/icore.h>
#include <QtCore/QTimer>
@@ -57,7 +56,7 @@ BaseTextMark::BaseTextMark(const QString &filename, int line)
void BaseTextMark::init()
{
m_init = true;
Core::EditorManager *em = Core::ICore::instance()->editorManager();
Core::EditorManager *em = Core::EditorManager::instance();
connect(em, SIGNAL(editorOpened(Core::IEditor *)), this, SLOT(editorOpened(Core::IEditor *)));
foreach (Core::IEditor *editor, em->openedEditors())
@@ -117,7 +116,7 @@ void BaseTextMark::updateMarker()
void BaseTextMark::moveMark(const QString & /* filename */, int /* line */)
{
Core::EditorManager *em = Core::ICore::instance()->editorManager();
Core::EditorManager *em = Core::EditorManager::instance();
if (!m_init) {
connect(em, SIGNAL(editorOpened(Core::IEditor *)), this, SLOT(editorOpened(Core::IEditor *)));
m_init = true;