-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index 44c721a..6a56358 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp @@ -172,18 +172,18 @@ void WLANImp::changeAndSaveSettingFile(){ if(authOpen->isChecked()) stream << " open"; else stream << " restricted"; - stream << "\n\""; + stream << "\"\n"; } stream << "\tCHANNEL=" << networkChannel->value() << "\n"; stream << "\tRATE=auto\n"; if(line.contains("esac")) stream << line << "\n"; } if(line.contains(";;")) output = true; - if(output) + if(output && (*it).length() ) stream << (*it) << '\n'; } file.close(); } @@ -207,10 +207,8 @@ void WLANImp::accept(){ // Try to save the interfaces settings. if(!interfaceSetup->saveChanges()) return; - QDialog::accept(); - return; // Restart the device now that the settings have changed QString initpath; if( QDir("/etc/rc.d/init.d").exists() ) initpath = "/etc/rc.d/init.d"; diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 44c721a..6a56358 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -172,18 +172,18 @@ void WLANImp::changeAndSaveSettingFile(){ if(authOpen->isChecked()) stream << " open"; else stream << " restricted"; - stream << "\n\""; + stream << "\"\n"; } stream << "\tCHANNEL=" << networkChannel->value() << "\n"; stream << "\tRATE=auto\n"; if(line.contains("esac")) stream << line << "\n"; } if(line.contains(";;")) output = true; - if(output) + if(output && (*it).length() ) stream << (*it) << '\n'; } file.close(); } @@ -207,10 +207,8 @@ void WLANImp::accept(){ // Try to save the interfaces settings. if(!interfaceSetup->saveChanges()) return; - QDialog::accept(); - return; // Restart the device now that the settings have changed QString initpath; if( QDir("/etc/rc.d/init.d").exists() ) initpath = "/etc/rc.d/init.d"; |