diff options
Diffstat (limited to 'src/plugins/fakevim/fakevimplugin.cpp')
-rw-r--r-- | src/plugins/fakevim/fakevimplugin.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 8aacac7c70..6273cdd461 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -491,6 +491,7 @@ public: void aboutToShutdown(); private slots: + void onCoreAboutToClose(); void editorOpened(Core::IEditor *); void editorAboutToClose(Core::IEditor *); @@ -583,6 +584,13 @@ FakeVimPluginPrivate::~FakeVimPluginPrivate() m_fakeVimExCommandsPage = 0; } +void FakeVimPluginPrivate::onCoreAboutToClose() +{ + // don't attach to editors any more + disconnect(editorManager(), SIGNAL(editorOpened(Core::IEditor*)), + this, SLOT(editorOpened(Core::IEditor*))); +} + void FakeVimPluginPrivate::aboutToShutdown() { theFakeVimSettings()->writeSettings(ICore::instance()->settings()); @@ -615,6 +623,8 @@ bool FakeVimPluginPrivate::initialize() actionManager()->actionContainer(Core::Constants::M_EDIT_ADVANCED); advancedMenu->addAction(cmd, Core::Constants::G_EDIT_EDITOR); + connect(m_core, SIGNAL(coreAboutToClose()), this, SLOT(onCoreAboutToClose())); + // EditorManager connect(editorManager(), SIGNAL(editorAboutToClose(Core::IEditor*)), this, SLOT(editorAboutToClose(Core::IEditor*))); |