aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/widgets
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2023-05-28 10:11:43 -0300
committerGitHub <noreply@github.com>2023-05-28 10:11:43 -0300
commitce2d58bb7d7e99da61b906253c0fea7815a82862 (patch)
treef958cd21fee8cba488e82229a1457db368079221 /launcher/ui/widgets
parentf24211e8b5d9af24ac3e27b0fdb50000a962c35f (diff)
parent7af116fb006e2eb62429740bd0abbe14f50ff244 (diff)
downloadPrismLauncher-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.cpp4
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++;