Todo: Remove nowadays unneeded use of global object pool

Change-Id: I3ff79f44dbb1fec19053949915a9d5ef71021ab2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-02-08 11:54:42 +01:00
parent 5409448888
commit 4e494debff

View File

@@ -113,14 +113,12 @@ void TodoPlugin::todoItemClicked(const TodoItem &item)
void TodoPlugin::createItemsProvider() void TodoPlugin::createItemsProvider()
{ {
m_todoItemsProvider = new TodoItemsProvider(m_settings); m_todoItemsProvider = new TodoItemsProvider(m_settings, this);
addAutoReleasedObject(m_todoItemsProvider);
} }
void TodoPlugin::createTodoOutputPane() void TodoPlugin::createTodoOutputPane()
{ {
m_todoOutputPane = new TodoOutputPane(m_todoItemsProvider->todoItemsModel(), &m_settings); m_todoOutputPane = new TodoOutputPane(m_todoItemsProvider->todoItemsModel(), &m_settings, this);
addAutoReleasedObject(m_todoOutputPane);
m_todoOutputPane->setScanningScope(m_settings.scanningScope); m_todoOutputPane->setScanningScope(m_settings.scanningScope);
connect(m_todoOutputPane, &TodoOutputPane::scanningScopeChanged, connect(m_todoOutputPane, &TodoOutputPane::scanningScopeChanged,
this, &TodoPlugin::scanningScopeChanged); this, &TodoPlugin::scanningScopeChanged);
@@ -130,8 +128,7 @@ void TodoPlugin::createTodoOutputPane()
void TodoPlugin::createOptionsPage() void TodoPlugin::createOptionsPage()
{ {
m_optionsPage = new OptionsPage(m_settings); m_optionsPage = new OptionsPage(m_settings, this);
addAutoReleasedObject(m_optionsPage);
connect(m_optionsPage, &OptionsPage::settingsChanged, connect(m_optionsPage, &OptionsPage::settingsChanged,
this, &TodoPlugin::settingsChanged); this, &TodoPlugin::settingsChanged);
} }