aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/fakevim
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-01-18 12:00:16 +0100
committerhjk <hjk@qt.io>2018-01-18 13:21:03 +0000
commit8320ae06f727dfdcf2820ea601aa36381b7d740a (patch)
tree3e4bbbe08c391e3d32f82c42b357ed6722484c12 /src/plugins/fakevim
parent8177a3c2194c4fc6241821932d737320b180ea36 (diff)
FakeVim: Use a more standard pattern to add option pages
Change-Id: I4167f98b29226ed9ae8eb630ea9d544db149da2c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/fakevim')
-rw-r--r--src/plugins/fakevim/fakevimplugin.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 0ec944f92e0..fcdfe7066c7 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -1086,9 +1086,6 @@ signals:
private:
FakeVimPlugin *q;
- FakeVimOptionPage *m_fakeVimOptionsPage = nullptr;
- FakeVimExCommandsPage *m_fakeVimExCommandsPage = nullptr;
- FakeVimUserCommandsPage *m_fakeVimUserCommandsPage = nullptr;
QHash<IEditor *, FakeVimHandler *> m_editorToHandler;
void triggerAction(Id id);
@@ -1174,18 +1171,6 @@ void FakeVimPluginPrivate::onCoreAboutToClose()
void FakeVimPluginPrivate::aboutToShutdown()
{
- q->removeObject(m_fakeVimOptionsPage);
- delete m_fakeVimOptionsPage;
- m_fakeVimOptionsPage = 0;
-
- q->removeObject(m_fakeVimExCommandsPage);
- delete m_fakeVimExCommandsPage;
- m_fakeVimExCommandsPage = 0;
-
- q->removeObject(m_fakeVimUserCommandsPage);
- delete m_fakeVimUserCommandsPage;
- m_fakeVimUserCommandsPage = 0;
-
delete m_wordProvider;
m_wordProvider = 0;
}
@@ -1206,14 +1191,9 @@ bool FakeVimPluginPrivate::initialize()
Context globalcontext(Core::Constants::C_GLOBAL);
- m_fakeVimOptionsPage = new FakeVimOptionPage;
- q->addObject(m_fakeVimOptionsPage);
-
- m_fakeVimExCommandsPage = new FakeVimExCommandsPage(this);
- q->addObject(m_fakeVimExCommandsPage);
-
- m_fakeVimUserCommandsPage = new FakeVimUserCommandsPage(this);
- q->addObject(m_fakeVimUserCommandsPage);
+ q->addAutoReleasedObject(new FakeVimOptionPage);
+ q->addAutoReleasedObject(new FakeVimExCommandsPage(this));
+ q->addAutoReleasedObject(new FakeVimUserCommandsPage(this));
readSettings();