summaryrefslogtreecommitdiff
path: root/src/plugins/fakevim
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2013-08-29 17:17:24 +0200
committerhjk <hjk121@nokiamail.com>2013-08-30 11:25:51 +0200
commiteb724f3772776849585be1417e90b1fb41a29698 (patch)
tree90709baa1d642b021cb81286cb34610db95d1ce8 /src/plugins/fakevim
parent4a24df38a3a164c51f9cdddd566c9928a7482a0a (diff)
downloadqt-creator-eb724f3772776849585be1417e90b1fb41a29698.tar.gz
EditorManager: Use interface directly instead of going through ICore
In the majority of cases we were doing that anyways, having two ways is just needlessly confusing. Change-Id: Ied362a702c23beee528368d74df1f2aabe5807f8 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 24006eefd7..ab3bc866ed 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -1041,7 +1041,7 @@ FakeVimPluginPrivate::~FakeVimPluginPrivate()
void FakeVimPluginPrivate::onCoreAboutToClose()
{
// Don't attach to editors anymore.
- disconnect(ICore::editorManager(), SIGNAL(editorOpened(Core::IEditor*)),
+ disconnect(EditorManager::instance(), SIGNAL(editorOpened(Core::IEditor*)),
this, SLOT(editorOpened(Core::IEditor*)));
}
@@ -1051,8 +1051,6 @@ void FakeVimPluginPrivate::aboutToShutdown()
bool FakeVimPluginPrivate::initialize()
{
- EditorManager *editorManager = ICore::editorManager();
-
//m_wordCompletion = new WordCompletion;
//q->addAutoReleasedObject(m_wordCompletion);
m_wordProvider = new FakeVimCompletionAssistProvider;
@@ -1102,9 +1100,9 @@ bool FakeVimPluginPrivate::initialize()
connect(ICore::instance(), SIGNAL(coreAboutToClose()), this, SLOT(onCoreAboutToClose()));
// EditorManager
- connect(editorManager, SIGNAL(editorAboutToClose(Core::IEditor*)),
+ connect(EditorManager::instance(), SIGNAL(editorAboutToClose(Core::IEditor*)),
this, SLOT(editorAboutToClose(Core::IEditor*)));
- connect(editorManager, SIGNAL(editorOpened(Core::IEditor*)),
+ connect(EditorManager::instance(), SIGNAL(editorOpened(Core::IEditor*)),
this, SLOT(editorOpened(Core::IEditor*)));
connect(theFakeVimSetting(ConfigUseFakeVim), SIGNAL(valueChanged(QVariant)),
@@ -1867,17 +1865,16 @@ void FakeVimPluginPrivate::handleDelayedQuit(bool forced, IEditor *editor)
{
// This tries to simulate vim behaviour. But the models of vim and
// Qt Creator core do not match well...
- EditorManager *editorManager = ICore::editorManager();
- if (editorManager->hasSplitter())
+ if (EditorManager::hasSplitter())
triggerAction(Core::Constants::REMOVE_CURRENT_SPLIT);
else
- editorManager->closeEditor(editor, !forced);
+ EditorManager::closeEditor(editor, !forced);
}
void FakeVimPluginPrivate::handleDelayedQuitAll(bool forced)
{
triggerAction(Core::Constants::REMOVE_ALL_SPLITS);
- ICore::editorManager()->closeAllEditors(!forced);
+ EditorManager::closeAllEditors(!forced);
}
void FakeVimPluginPrivate::moveToMatchingParenthesis(bool *moved, bool *forward,