aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2023-07-07 12:18:04 +0100
committerGitHub <noreply@github.com>2023-07-07 12:18:04 +0100
commitec85266860b7503b24ff3840fb6bf74588acc7c8 (patch)
tree193079e87a47ba7670255d733df211fa957a59e1
parent4c25e3ce75158b6a17fafd60849621f5e0338fc9 (diff)
downloadPrismLauncher-ec85266860b7503b24ff3840fb6bf74588acc7c8.tar.gz
PrismLauncher-ec85266860b7503b24ff3840fb6bf74588acc7c8.tar.bz2
PrismLauncher-ec85266860b7503b24ff3840fb6bf74588acc7c8.zip
Memory leak fixes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
-rw-r--r--launcher/ui/InstanceWindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/ui/InstanceWindow.cpp b/launcher/ui/InstanceWindow.cpp
index 78580bcb..ac8454c7 100644
--- a/launcher/ui/InstanceWindow.cpp
+++ b/launcher/ui/InstanceWindow.cpp
@@ -75,11 +75,11 @@ InstanceWindow::InstanceWindow(InstancePtr instance, QWidget *parent)
// Add custom buttons to the page container layout.
{
- auto horizontalLayout = new QHBoxLayout();
+ auto horizontalLayout = new QHBoxLayout(this);
horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
horizontalLayout->setContentsMargins(6, -1, 6, -1);
- auto btnHelp = new QPushButton();
+ auto btnHelp = new QPushButton(this);
btnHelp->setText(tr("Help"));
horizontalLayout->addWidget(btnHelp);
connect(btnHelp, &QPushButton::clicked, m_container, &PageContainer::help);
@@ -104,7 +104,7 @@ InstanceWindow::InstanceWindow(InstancePtr instance, QWidget *parent)
updateButtons();
- m_closeButton = new QPushButton();
+ m_closeButton = new QPushButton(this);
m_closeButton->setText(tr("Close"));
horizontalLayout->addWidget(m_closeButton);
connect(m_closeButton, &QPushButton::clicked, this, &QMainWindow::close);