From 3d1b70c58e0d2eea47572ec4a018a18674508f9b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 10 Dec 2013 15:54:20 +0100 Subject: Remove the need to register editors in the action handler The action handler already knows which editors to handle through the context. It only needs to receive signals for updating the actions from the current editor. So there is no need to tell the action handler about every individual editor. This also removes some noise from the text editor implementations. Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa Reviewed-by: David Schulz --- src/plugins/texteditor/texteditorplugin.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/plugins/texteditor/texteditorplugin.cpp') diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index a61e82f02a..2721eac7c3 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -203,11 +203,6 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe m_outlineFactory = new OutlineFactory; addAutoReleasedObject(m_outlineFactory); - // We have to initialize the actions because other plugins that - // depend upon the texteditorplugin expect that actions will be - // registered in the action manager at plugin initialization time. - m_editorFactory->actionHandler()->initializeActions(); - m_baseTextMarkRegistry = new BaseTextMarkRegistry(this); return true; @@ -246,14 +241,6 @@ void TextEditorPlugin::extensionsInitialized() this, SLOT(updateCurrentSelection(QString))); } -void TextEditorPlugin::initializeEditor(PlainTextEditorWidget *editor) -{ - // common actions - m_editorFactory->actionHandler()->setupActions(editor); - - TextEditorSettings::initializeEditor(editor); -} - void TextEditorPlugin::invokeCompletion() { Core::IEditor *iface = Core::EditorManager::currentEditor(); -- cgit v1.2.3