summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-23 03:19:18 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-23 03:19:18 -0600
commitcd7bf11ba9885d974f94c0ae57709b99c63b92c2 (patch)
treee23c9af8c9fc0acc5bc01cf957906a3ded3f0ce7 /ui
parent86f415d369a209dcd656584697c51d3171e7cee0 (diff)
downloadhorizon-cd7bf11ba9885d974f94c0ae57709b99c63b92c2.tar.gz
horizon-cd7bf11ba9885d974f94c0ae57709b99c63b92c2.tar.bz2
horizon-cd7bf11ba9885d974f94c0ae57709b99c63b92c2.tar.xz
horizon-cd7bf11ba9885d974f94c0ae57709b99c63b92c2.zip
Qt UI: Fix small memory leaks
Diffstat (limited to 'ui')
-rw-r--r--ui/qt5/bootpage.cc4
-rw-r--r--ui/qt5/partitionpage.cc1
-rw-r--r--ui/qt5/pkgdefaults.cc8
3 files changed, 7 insertions, 6 deletions
diff --git a/ui/qt5/bootpage.cc b/ui/qt5/bootpage.cc
index 09bebbf..baa9c67 100644
--- a/ui/qt5/bootpage.cc
+++ b/ui/qt5/bootpage.cc
@@ -3,7 +3,7 @@
* horizon-qt5, the Qt 5 user interface for
* Project Horizon
*
- * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved.
+ * Copyright (c) 2019-2020 Adélie Linux and contributors. All rights reserved.
* This code is licensed under the AGPL 3.0 license, as noted in the
* LICENSE-code file in the root directory of this repository.
*
@@ -34,7 +34,7 @@ BootPage::BootPage(QWidget *parent) : HorizonWizardPage(parent) {
yesGrub->setWhatsThis(tr("This option will install a bootloader to your hard disk, replacing any other bootloader if present."));
noGrub = new QRadioButton(tr("&Do not install a boot loader."));
noGrub->setWhatsThis(tr("This option will not install a bootloader to your hard disk. You may be required to configure a bootloader yourself before your computer will start up properly."));
- QButtonGroup *grubChoices = new QButtonGroup;
+ QButtonGroup *grubChoices = new QButtonGroup(this);
grubChoices->addButton(yesGrub, true);
grubChoices->addButton(noGrub, false);
connect(grubChoices, static_cast<void (QButtonGroup:: *)(int)>(&QButtonGroup::buttonClicked),
diff --git a/ui/qt5/partitionpage.cc b/ui/qt5/partitionpage.cc
index 1d259b1..a74b1a9 100644
--- a/ui/qt5/partitionpage.cc
+++ b/ui/qt5/partitionpage.cc
@@ -73,6 +73,7 @@ void PartitionPage::scanDisks() {
}
thread = new PartitionProbeThread;
+ thread->setParent(this);
connect(thread, &PartitionProbeThread::foundDisks,
this, &PartitionPage::processDisks);
thread->start();
diff --git a/ui/qt5/pkgdefaults.cc b/ui/qt5/pkgdefaults.cc
index e3c358d..34be52c 100644
--- a/ui/qt5/pkgdefaults.cc
+++ b/ui/qt5/pkgdefaults.cc
@@ -3,7 +3,7 @@
* horizon-qt5, the Qt 5 user interface for
* Project Horizon
*
- * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved.
+ * Copyright (c) 2019-2020 Adélie Linux and contributors. All rights reserved.
* This code is licensed under the AGPL 3.0 license, as noted in the
* LICENSE-code file in the root directory of this repository.
*
@@ -34,7 +34,7 @@ PkgDefaultsPage::PkgDefaultsPage(QWidget *parent) : HorizonWizardPage(parent) {
/******************** /bin/sh provider ********************/
- QButtonGroup *shellGroup = new QButtonGroup;
+ QButtonGroup *shellGroup = new QButtonGroup(this);
QLabel *shellLabel = new QLabel(tr("Shell to use for /bin/sh:"));
shellLabel->setWordWrap(true);
@@ -66,7 +66,7 @@ PkgDefaultsPage::PkgDefaultsPage(QWidget *parent) : HorizonWizardPage(parent) {
/******************** /sbin/init provider ********************/
- QButtonGroup *initGroup = new QButtonGroup;
+ QButtonGroup *initGroup = new QButtonGroup(this);
QLabel *initLabel = new QLabel(tr("Init system (/sbin/init):"));
initLabel->setWordWrap(true);
@@ -93,7 +93,7 @@ PkgDefaultsPage::PkgDefaultsPage(QWidget *parent) : HorizonWizardPage(parent) {
/******************** device event handler ********************/
- QButtonGroup *udevGroup = new QButtonGroup;
+ QButtonGroup *udevGroup = new QButtonGroup(this);
QLabel *udevLabel = new QLabel(tr("uevent management daemon:"));
udevLabel->setWordWrap(true);