diff options
author | flow <flowlnlnln@gmail.com> | 2023-05-28 10:11:43 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-28 10:11:43 -0300 |
commit | ce2d58bb7d7e99da61b906253c0fea7815a82862 (patch) | |
tree | f958cd21fee8cba488e82229a1457db368079221 /launcher/ui/widgets | |
parent | f24211e8b5d9af24ac3e27b0fdb50000a962c35f (diff) | |
parent | 7af116fb006e2eb62429740bd0abbe14f50ff244 (diff) | |
download | PrismLauncher-ce2d58bb7d7e99da61b906253c0fea7815a82862.tar.gz PrismLauncher-ce2d58bb7d7e99da61b906253c0fea7815a82862.tar.bz2 PrismLauncher-ce2d58bb7d7e99da61b906253c0fea7815a82862.zip |
Merge pull request #1083 from Ryex/fix/memory-leaks-develop
Diffstat (limited to 'launcher/ui/widgets')
-rw-r--r-- | launcher/ui/widgets/PageContainer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/ui/widgets/PageContainer.cpp b/launcher/ui/widgets/PageContainer.cpp index 0a06a351..b9b17b42 100644 --- a/launcher/ui/widgets/PageContainer.cpp +++ b/launcher/ui/widgets/PageContainer.cpp @@ -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++; |