diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-12-10 15:54:20 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-12-12 09:59:27 +0100 |
commit | 3d1b70c58e0d2eea47572ec4a018a18674508f9b (patch) | |
tree | 2217255fb7d6bc8e3e30603bb985cb655ab7be7d /src/plugins/glsleditor/glsleditorplugin.cpp | |
parent | 3ee9fb4d1c74058c785f24d19bac5fe879c75109 (diff) |
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>
Diffstat (limited to 'src/plugins/glsleditor/glsleditorplugin.cpp')
-rw-r--r-- | src/plugins/glsleditor/glsleditorplugin.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp index 43b30df3053..de927d26eca 100644 --- a/src/plugins/glsleditor/glsleditorplugin.cpp +++ b/src/plugins/glsleditor/glsleditorplugin.cpp @@ -48,7 +48,6 @@ #include <projectexplorer/taskhub.h> #include <extensionsystem/pluginmanager.h> #include <texteditor/texteditorconstants.h> -#include <texteditor/texteditorsettings.h> #include <texteditor/textfilewizard.h> #include <texteditor/texteditoractionhandler.h> #include <utils/qtcassert.h> @@ -149,7 +148,6 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er TextEditorActionHandler::Format | TextEditorActionHandler::UnCommentSelection | TextEditorActionHandler::UnCollapseAll); - dd->m_actionHandler->initializeActions(); ActionContainer *contextMenu = ActionManager::createMenu(GLSLEditor::Constants::M_CONTEXT); ActionContainer *glslToolsMenu = ActionManager::createMenu(Id(Constants::M_TOOLS_GLSL)); @@ -245,13 +243,6 @@ ExtensionSystem::IPlugin::ShutdownFlag GLSLEditorPlugin::aboutToShutdown() return IPlugin::aboutToShutdown(); } -void GLSLEditorPlugin::initializeEditor(GLSLTextEditorWidget *editor) -{ - QTC_CHECK(m_instance); - dd->m_actionHandler->setupActions(editor); - TextEditorSettings::initializeEditor(editor); -} - static QByteArray glslFile(const QString &fileName) { QFile file(ICore::resourcePath() + QLatin1String("/glsl/") + fileName); |