summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/qt5/bootpage.cc10
-rw-r--r--ui/qt5/firmwarepage.cc2
-rw-r--r--ui/qt5/networkingpage.cc2
-rw-r--r--ui/qt5/pkgdefaults.cc20
-rw-r--r--ui/qt5/pkgsimple.cc8
5 files changed, 21 insertions, 21 deletions
diff --git a/ui/qt5/bootpage.cc b/ui/qt5/bootpage.cc
index baa9c67..e1dda77 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-2020 Adélie Linux and contributors. All rights reserved.
+ * Copyright (c) 2019-2022 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.
*
@@ -37,9 +37,9 @@ BootPage::BootPage(QWidget *parent) : HorizonWizardPage(parent) {
QButtonGroup *grubChoices = new QButtonGroup(this);
grubChoices->addButton(yesGrub, true);
grubChoices->addButton(noGrub, false);
- connect(grubChoices, static_cast<void (QButtonGroup:: *)(int)>(&QButtonGroup::buttonClicked),
- [=](int choice) {
- horizonWizard()->grub = static_cast<bool>(choice);
+ connect(grubChoices, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *choice) {
+ horizonWizard()->grub = static_cast<bool>(grubChoices->id(choice));
});
Section *kernDisclosure = new Section("Kernel options");
@@ -55,7 +55,7 @@ BootPage::BootPage(QWidget *parent) : HorizonWizardPage(parent) {
QButtonGroup *kernelChoices = new QButtonGroup;
kernelChoices->addButton(easyKernel);
kernelChoices->addButton(mlKernel);
- connect(kernelChoices, static_cast<void(QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
+ connect(kernelChoices, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
[=](QAbstractButton *button) {
if(button == easyKernel) {
horizonWizard()->kernel = "easy-kernel";
diff --git a/ui/qt5/firmwarepage.cc b/ui/qt5/firmwarepage.cc
index a8d6fa5..12273e5 100644
--- a/ui/qt5/firmwarepage.cc
+++ b/ui/qt5/firmwarepage.cc
@@ -43,7 +43,7 @@ FirmwarePage::FirmwarePage(QWidget *parent) : HorizonWizardPage(parent) {
layout->addWidget(yesButton);
layout->addStretch();
- connect(firmwareChoice, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
+ connect(firmwareChoice, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
[=](QAbstractButton *button) {
if(button == yesButton) horizonWizard()->firmware = true;
else horizonWizard()->firmware = false;
diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc
index 9997943..d7b5ced 100644
--- a/ui/qt5/networkingpage.cc
+++ b/ui/qt5/networkingpage.cc
@@ -66,7 +66,7 @@ void NetworkingPage::initializePage() {
}
radioGroup->addButton(skip);
- QObject::connect(radioGroup, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
+ QObject::connect(radioGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
[=](QAbstractButton *button) {
if(button == skip) {
horizonWizard()->network = false;
diff --git a/ui/qt5/pkgdefaults.cc b/ui/qt5/pkgdefaults.cc
index 34be52c..6246aad 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-2020 Adélie Linux and contributors. All rights reserved.
+ * Copyright (c) 2019-2022 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.
*
@@ -51,9 +51,9 @@ PkgDefaultsPage::PkgDefaultsPage(QWidget *parent) : HorizonWizardPage(parent) {
"Note that by choosing this option, your system will no longer be able to conform to the POSIX standard."));
shellGroup->addButton(bashShell, HorizonWizard::Bash);
- connect(shellGroup, static_cast<void (QButtonGroup:: *)(int)>(&QButtonGroup::buttonClicked),
- [=](int choice) {
- horizonWizard()->binsh = static_cast<HorizonWizard::BinShProvider>(choice);
+ connect(shellGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *choice) {
+ horizonWizard()->binsh = static_cast<HorizonWizard::BinShProvider>(shellGroup->id(choice));
});
QHBoxLayout *shellLayout = new QHBoxLayout;
@@ -78,9 +78,9 @@ PkgDefaultsPage::PkgDefaultsPage(QWidget *parent) : HorizonWizardPage(parent) {
sysvInit->setWhatsThis(tr("Use the traditional sysvinit init system."));
initGroup->addButton(sysvInit, HorizonWizard::SysVInit);
- connect(initGroup, static_cast<void (QButtonGroup:: *)(int)>(&QButtonGroup::buttonClicked),
- [=](int choice) {
- horizonWizard()->sbininit = static_cast<HorizonWizard::InitSystem>(choice);
+ connect(initGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *choice) {
+ horizonWizard()->sbininit = static_cast<HorizonWizard::InitSystem>(initGroup->id(choice));
});
QHBoxLayout *initLayout = new QHBoxLayout;
@@ -108,9 +108,9 @@ PkgDefaultsPage::PkgDefaultsPage(QWidget *parent) : HorizonWizardPage(parent) {
"Choosing this option on a desktop system will require manual intervention."));
udevGroup->addButton(mdevd, false);
- connect(udevGroup, static_cast<void (QButtonGroup:: *)(int)>(&QButtonGroup::buttonClicked),
- [=](int choice) {
- horizonWizard()->eudev = static_cast<bool>(choice);
+ connect(udevGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *choice) {
+ horizonWizard()->eudev = static_cast<bool>(udevGroup->id(choice));
});
QHBoxLayout *udevLayout = new QHBoxLayout;
diff --git a/ui/qt5/pkgsimple.cc b/ui/qt5/pkgsimple.cc
index b784bc6..2cd61b9 100644
--- a/ui/qt5/pkgsimple.cc
+++ b/ui/qt5/pkgsimple.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-2022 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.
*
@@ -76,9 +76,9 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
group->addButton(compactButton, HorizonWizard::Compact);
group->addButton(textButton, HorizonWizard::TextOnly);
group->addButton(customButton, HorizonWizard::Custom);
- connect(group, static_cast<void (QButtonGroup:: *)(int)>(&QButtonGroup::buttonClicked),
- [=](int id) {
- horizonWizard()->pkgtype = static_cast<HorizonWizard::PackageType>(id);
+ connect(group, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *choice) {
+ horizonWizard()->pkgtype = static_cast<HorizonWizard::PackageType>(group->id(choice));
});
QGridLayout *buttonLayout = new QGridLayout;