From 5575b3475bdbad44f5e05f1b7755859a14f9a84c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 23 Feb 2020 01:10:29 -0600 Subject: Qt UI: Fix issues identified by static analysis --- ui/qt5/networkingpage.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ui/qt5/networkingpage.cc') diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc index 5e72dba..589ad5f 100644 --- a/ui/qt5/networkingpage.cc +++ b/ui/qt5/networkingpage.cc @@ -22,14 +22,20 @@ NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) { loadWatermark("network"); setTitle(tr("Networking Setup")); + + radioGroup = new QButtonGroup(this); + + simple = new QRadioButton(tr("&Automatic - my computer connects to the Internet directly\n" + "or via a modem/router.")); + advanced = new QRadioButton(tr("&Manual - my computer connects to an enterprise network,\n" + "or I use a static IP address, VPN, or 802.1X security.")); + skip = new QRadioButton(tr("&Skip - I don't want to connect to a network or the Internet.")); } void NetworkingPage::initializePage() { QLabel *descLabel; QVBoxLayout *layout; - radioGroup = new QButtonGroup(this); - #ifdef HAS_INSTALL_ENV if(horizonWizard()->interfaces.empty()) { descLabel = new QLabel(tr( @@ -52,15 +58,9 @@ void NetworkingPage::initializePage() { if(!horizonWizard()->interfaces.empty()) #endif /* HAS_INSTALL_ENV */ { - simple = new QRadioButton(tr("&Automatic - my computer connects to the Internet directly\n" - "or via a modem/router.")); - advanced = new QRadioButton(tr("&Manual - my computer connects to an enterprise network,\n" - "or I use a static IP address, VPN, or 802.1X security.")); radioGroup->addButton(simple); radioGroup->addButton(advanced); } - skip = new QRadioButton(tr("&Skip - I don't want to connect to a network or the Internet.")); - radioGroup->addButton(skip); QObject::connect(radioGroup, static_cast(&QButtonGroup::buttonClicked), -- cgit v1.2.3-70-g09d2