aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/glsleditor/glsleditorplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-12-10 17:13:21 +0100
committerEike Ziller <eike.ziller@digia.com>2013-12-12 09:59:55 +0100
commitd80fb696aba1594afa76d0573d79e9aa9da09005 (patch)
treecd5b442a8668596052596dc44e5f7e59952e2e03 /src/plugins/glsleditor/glsleditorplugin.cpp
parent3d1b70c58e0d2eea47572ec4a018a18674508f9b (diff)
Give TextEditorActionHandler an explicit parent and unify usage.
The action handler implicitly passed ownership to ICore, which is non- to the action handler. We now consistently create the action handler in the editor factory, give ownership to the editor factory, and don't hold a reference to it. Change-Id: I4372f8de966e3ceff87c06c5528c6b54522c1d57 Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/glsleditor/glsleditorplugin.cpp')
-rw-r--r--src/plugins/glsleditor/glsleditorplugin.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/plugins/glsleditor/glsleditorplugin.cpp b/src/plugins/glsleditor/glsleditorplugin.cpp
index de927d26eca..41a3f5db2de 100644
--- a/src/plugins/glsleditor/glsleditorplugin.cpp
+++ b/src/plugins/glsleditor/glsleditorplugin.cpp
@@ -49,7 +49,6 @@
#include <extensionsystem/pluginmanager.h>
#include <texteditor/texteditorconstants.h>
#include <texteditor/textfilewizard.h>
-#include <texteditor/texteditoractionhandler.h>
#include <utils/qtcassert.h>
#include <glsl/glslengine.h>
@@ -76,7 +75,6 @@ class GLSLEditorPluginPrivate
public:
GLSLEditorPluginPrivate() :
m_editor(0),
- m_actionHandler(0),
m_glsl_120_frag(0),
m_glsl_120_vert(0),
m_glsl_120_common(0),
@@ -87,7 +85,6 @@ public:
~GLSLEditorPluginPrivate()
{
- delete m_actionHandler;
delete m_glsl_120_frag;
delete m_glsl_120_vert;
delete m_glsl_120_common;
@@ -97,7 +94,6 @@ public:
}
GLSLEditorFactory *m_editor;
- TextEditor::TextEditorActionHandler *m_actionHandler;
QPointer<TextEditor::ITextEditor> m_currentTextEditable;
GLSLEditorPlugin::InitFile *m_glsl_120_frag;
@@ -144,11 +140,6 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
addAutoReleasedObject(new GLSLCompletionAssistProvider);
- dd->m_actionHandler = new TextEditorActionHandler(Constants::C_GLSLEDITOR_ID,
- TextEditorActionHandler::Format
- | TextEditorActionHandler::UnCommentSelection
- | TextEditorActionHandler::UnCollapseAll);
-
ActionContainer *contextMenu = ActionManager::createMenu(GLSLEditor::Constants::M_CONTEXT);
ActionContainer *glslToolsMenu = ActionManager::createMenu(Id(Constants::M_TOOLS_GLSL));
glslToolsMenu->setOnAllDisabledBehavior(ActionContainer::Hide);