core: remove usages of Core::ICore::instance()->modeManager()

The function is still there but should be remove in my opinion.

Change-Id: I739fe942e74f459faccb80b5bcb8a5721c6bb9bf
Reviewed-on: http://codereview.qt.nokia.com/4200
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-09-02 17:15:18 +02:00
committed by hjk
parent 65f5c42bc5
commit e684960523
14 changed files with 54 additions and 57 deletions

View File

@@ -71,6 +71,8 @@ namespace {
bool debug = false;
}
using namespace Core;
/* SessionFile definitions */
namespace ProjectExplorer {
namespace Internal {
@@ -323,7 +325,7 @@ SessionManager::SessionManager(QObject *parent)
m_sessionNode(new Internal::SessionNodeImpl(this)),
m_virginSession(true)
{
connect(m_core->modeManager(), SIGNAL(currentModeChanged(Core::IMode*)),
connect(ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)),
this, SLOT(saveActiveMode(Core::IMode*)));
Core::EditorManager *em = m_core->editorManager();
@@ -554,8 +556,8 @@ bool SessionManager::createImpl(const QString &fileName)
setStartupProject(0);
if (!isDefaultVirgin()) {
m_core->modeManager()->activateMode(Core::Constants::MODE_EDIT);
m_core->modeManager()->setFocusToCurrentMode();
ModeManager::instance()->activateMode(Core::Constants::MODE_EDIT);
ModeManager::instance()->setFocusToCurrentMode();
}
}
@@ -625,8 +627,8 @@ bool SessionManager::loadImpl(const QString &fileName)
if (modeIdentifier.isEmpty())
modeIdentifier = Core::Constants::MODE_EDIT;
m_core->modeManager()->activateMode(modeIdentifier);
m_core->modeManager()->setFocusToCurrentMode();
ModeManager::instance()->activateMode(modeIdentifier);
ModeManager::instance()->setFocusToCurrentMode();
}
if (debug)