diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-19 15:39:24 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-19 15:39:24 -0600 |
commit | ced941f5f08e231e4c7a8ecde88441e70128ada5 (patch) | |
tree | a0c6ff3e6b977ec89013969aa5567fb18f709e4b | |
parent | a4abbbc1f96d6cbaeb4ac85fb9ada45c7300a18a (diff) | |
download | horizon-ced941f5f08e231e4c7a8ecde88441e70128ada5.tar.gz horizon-ced941f5f08e231e4c7a8ecde88441e70128ada5.tar.bz2 horizon-ced941f5f08e231e4c7a8ecde88441e70128ada5.tar.xz horizon-ced941f5f08e231e4c7a8ecde88441e70128ada5.zip |
Qt UI: Use public members instead of fields for non-widget backed answers
-rw-r--r-- | ui/qt5/firmwarepage.cc | 4 | ||||
-rw-r--r-- | ui/qt5/horizonwizard.hh | 4 | ||||
-rw-r--r-- | ui/qt5/networkingpage.cc | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/ui/qt5/firmwarepage.cc b/ui/qt5/firmwarepage.cc index 235d9af..4d5893e 100644 --- a/ui/qt5/firmwarepage.cc +++ b/ui/qt5/firmwarepage.cc @@ -46,8 +46,8 @@ FirmwarePage::FirmwarePage(QWidget *parent) : HorizonWizardPage(parent) { setField("firmware", QVariant(false)); connect(firmwareChoice, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked), [=](QAbstractButton *button) { - if(button == yesButton) setField("firmware", QVariant(true)); - else setField("firmware", QVariant(false)); + if(button == yesButton) horizonWizard()->firmware = true; + else horizonWizard()->firmware = false; }); setLayout(layout); diff --git a/ui/qt5/horizonwizard.hh b/ui/qt5/horizonwizard.hh index 2941f08..3986f46 100644 --- a/ui/qt5/horizonwizard.hh +++ b/ui/qt5/horizonwizard.hh @@ -81,7 +81,11 @@ public: std::string mirror_domain; std::string version; +#ifdef NON_LIBRE_FIRMWARE + bool firmware; +#endif /* NON_LIBRE_FIRMWARE */ std::map<std::string, NetworkInterface> interfaces; + bool network; std::string chosen_auto_iface; }; diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc index c1bf372..15fea56 100644 --- a/ui/qt5/networkingpage.cc +++ b/ui/qt5/networkingpage.cc @@ -14,7 +14,6 @@ #include "horizonwizard.hh" #include <QLabel> -#include <QVariant> #include <QVBoxLayout> NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) { @@ -56,8 +55,8 @@ void NetworkingPage::initializePage() { QObject::connect(radioGroup, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked), [=](QAbstractButton *button) { - if(button == skip) setField("network", QVariant(false)); - else setField("network", QVariant(true)); + if(button == skip) horizonWizard()->network = false; + else horizonWizard()->network = true; emit completeChanged(); }); |