fix(memory leak): don't give shared pointers out to foldermodels (causes cyclic refrence)
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
37420405c7
commit
a04a6f1e0d
17 changed files with 46 additions and 51 deletions
|
@ -87,7 +87,9 @@ PageContainer::PageContainer(BasePageProvider *pageProvider, QString defaultId,
|
|||
auto pages = pageProvider->getPages();
|
||||
for (auto page : pages)
|
||||
{
|
||||
page->stackIndex = m_pageStack->addWidget(dynamic_cast<QWidget *>(page));
|
||||
auto widget = dynamic_cast<QWidget *>(page);
|
||||
widget->setParent(this);
|
||||
page->stackIndex = m_pageStack->addWidget(widget);
|
||||
page->listIndex = counter;
|
||||
page->setParentContainer(this);
|
||||
counter++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue