diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-05-26 14:48:38 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-05-27 08:42:00 +0000 |
commit | e5bb7d1ffebbba90aa2c1098c1ff67694dd0fdaf (patch) | |
tree | 36e0de1bc7374a9fa77bec011845783f5e57036d /src/plugins/designer | |
parent | 7b5481f75c968ba1eb74240609b0d5d687a30e68 (diff) |
Remove unnecessary removeContextObject calls
They are removed on deletion now.
Change-Id: I08461ea4938e24ab450df013a0f8f820032381da
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/designer')
-rw-r--r-- | src/plugins/designer/formeditorw.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index ad5cb8c97b..2e673033ae 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -211,7 +211,6 @@ public: QMenu *m_previewInStyleMenu = nullptr; QAction *m_actionAboutPlugins = nullptr; - DesignerContext *m_context = nullptr; Context m_contexts; QList<Id> m_toolActionIds; @@ -275,8 +274,6 @@ FormEditorData::FormEditorData() : FormEditorData::~FormEditorData() { - if (m_context) - ICore::removeContextObject(m_context); if (m_initStage == FormEditorW::FullyInitialized) { QSettings *s = ICore::settings(); s->beginGroup(settingsGroupC); @@ -423,8 +420,7 @@ void FormEditorData::fullInit() Context designerContexts = m_contexts; designerContexts.add(Core::Constants::C_EDITORMANAGER); - m_context = new DesignerContext(designerContexts, m_modeWidget, m_instance); - ICore::addContextObject(m_context); + ICore::addContextObject(new DesignerContext(designerContexts, m_modeWidget, m_instance)); DesignMode::registerDesignWidget(m_modeWidget, QStringList(FORM_MIMETYPE), m_contexts); |