forked from qt-creator/qt-creator
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 <david.schulz@digia.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user