From dcaa343ed25955a38358c185d1bb3fea44bb7e11 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 14 Dec 2019 19:38:18 -0600 Subject: Qt UI: Ensure STAMP is updated before attempting to associate --- ui/qt5/netsimplewifipage.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'ui/qt5') diff --git a/ui/qt5/netsimplewifipage.cc b/ui/qt5/netsimplewifipage.cc index 12f8301..0fefda5 100644 --- a/ui/qt5/netsimplewifipage.cc +++ b/ui/qt5/netsimplewifipage.cc @@ -302,12 +302,19 @@ int NetworkSimpleWirelessPage::processScan(wpactrl_t *c, const char *, size_t) { bool NetworkSimpleWirelessPage::validatePage() { #ifdef HAS_INSTALL_ENV const char *ssid, *pass; - if(passphrase->isHidden()) pass = nullptr; - else pass = passphrase->text().toStdString().c_str(); + + if(passphrase->isHidden()) { + pass = nullptr; + } else { + pass = passphrase->text().toStdString().c_str(); + } ssid = ssidListView->selectedItems()[0]->text().toStdString().c_str(); + tain_now_g(); if(wpactrl_associate_g(&control, ssid, pass) == 0) { - QMessageBox::critical(this, tr("Could Not Connect"), tr("An issue occurred connecting to the specified wireless network. Ensure your passphrase is correct and try again.")); + QMessageBox::critical(this, tr("Could Not Connect"), + tr("An issue occurred connecting to the specified wireless network. " + "Ensure your passphrase is correct and try again.")); return false; } #endif /* HAS_INSTALL_ENV */ -- cgit v1.2.3-70-g09d2