summaryrefslogtreecommitdiff
path: root/src/plugins/scxmleditor/scxmleditordata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/scxmleditor/scxmleditordata.cpp')
-rw-r--r--src/plugins/scxmleditor/scxmleditordata.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/scxmleditor/scxmleditordata.cpp b/src/plugins/scxmleditor/scxmleditordata.cpp
index 14d9c26e18..881c39af9a 100644
--- a/src/plugins/scxmleditor/scxmleditordata.cpp
+++ b/src/plugins/scxmleditor/scxmleditordata.cpp
@@ -111,9 +111,6 @@ ScxmlEditorData::ScxmlEditorData()
ScxmlEditorData::~ScxmlEditorData()
{
- if (m_context)
- ICore::removeContextObject(m_context);
-
if (m_modeWidget) {
DesignMode::unregisterDesignWidget(m_modeWidget);
delete m_modeWidget;
@@ -146,8 +143,8 @@ void ScxmlEditorData::fullInit()
Context scxmlContexts = m_contexts;
scxmlContexts.add(Core::Constants::C_EDITORMANAGER);
- m_context = new ScxmlContext(scxmlContexts, m_modeWidget, this);
- ICore::addContextObject(m_context);
+ auto context = new ScxmlContext(scxmlContexts, m_modeWidget, this);
+ ICore::addContextObject(context);
DesignMode::registerDesignWidget(m_modeWidget, QStringList(QLatin1String(ProjectExplorer::Constants::SCXML_MIMETYPE)), m_contexts);
}