summaryrefslogtreecommitdiff
path: root/ui/qt5/netsimplewifipage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt5/netsimplewifipage.cc')
-rw-r--r--ui/qt5/netsimplewifipage.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/qt5/netsimplewifipage.cc b/ui/qt5/netsimplewifipage.cc
index 9b41407..1337442 100644
--- a/ui/qt5/netsimplewifipage.cc
+++ b/ui/qt5/netsimplewifipage.cc
@@ -311,9 +311,11 @@ bool NetworkSimpleWirelessPage::validatePage() {
if(passphrase->isHidden()) {
pass = nullptr;
} else {
- pass = ("\"" + passphrase->text().toStdString() + "\"").c_str();
+ std::string password = ("\"" + passphrase->text().toStdString() + "\"");
+ pass = password.c_str();
}
- ssid = ("\"" + items[0]->text().toStdString() + "\"").c_str();
+ std::string network = ("\"" + items[0]->text().toStdString() + "\"");
+ ssid = network.c_str();
tain_now_g();
if(wpactrl_associate_g(&control, ssid, pass) == 0) {