diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-28 02:15:39 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-28 02:15:39 -0700 |
commit | a04a6f1e0d0d551506a86964c51e5ce6af5587b4 (patch) | |
tree | 8dac30aa1cb3f188a4a0dce5b734c5937068488a /launcher/ui/dialogs | |
parent | 37420405c7b5dddb003533e1487ba45a2da5b808 (diff) | |
download | PrismLauncher-a04a6f1e0d0d551506a86964c51e5ce6af5587b4.tar.gz PrismLauncher-a04a6f1e0d0d551506a86964c51e5ce6af5587b4.tar.bz2 PrismLauncher-a04a6f1e0d0d551506a86964c51e5ce6af5587b4.zip |
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>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/NewInstanceDialog.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/dialogs/ResourceDownloadDialog.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp index 64ed7673..aafaf220 100644 --- a/launcher/ui/dialogs/NewInstanceDialog.cpp +++ b/launcher/ui/dialogs/NewInstanceDialog.cpp @@ -99,7 +99,7 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString // NOTE: m_buttons must be initialized before PageContainer, because it indirectly accesses m_buttons through setSuggestedPack! Do not move this below. m_buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - m_container = new PageContainer(this); + m_container = new PageContainer(this, {}, this); m_container->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding); m_container->layout()->setContentsMargins(0, 0, 0, 0); ui->verticalLayout->insertWidget(2, m_container); diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp index edb7d063..d2a8d33e 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp +++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp @@ -89,7 +89,7 @@ void ResourceDownloadDialog::reject() // won't work with subclasses if we put it in this ctor. void ResourceDownloadDialog::initializeContainer() { - m_container = new PageContainer(this); + m_container = new PageContainer(this, {}, this); m_container->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding); m_container->layout()->setContentsMargins(0, 0, 0, 0); m_vertical_layout.addWidget(m_container); |