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

@@ -191,7 +191,6 @@ void DesignMode::currentEditorChanged(Core::IEditor *editor)
return;
bool mimeEditorAvailable = false;
Core::ICore *core = Core::ICore::instance();
if (editor && editor->file()) {
const QString mimeType = editor->file()->mimeType();
@@ -216,8 +215,8 @@ void DesignMode::currentEditorChanged(Core::IEditor *editor)
if (!mimeEditorAvailable) {
setActiveContext(Context());
if (core->modeManager()->currentMode() == this)
core->modeManager()->activateMode(Core::Constants::MODE_EDIT);
if (ModeManager::instance()->currentMode() == this)
ModeManager::instance()->activateMode(Core::Constants::MODE_EDIT);
setEnabled(false);
d->m_currentEditor = QWeakPointer<Core::IEditor>();
emit actionsUpdated(d->m_currentEditor.data());