mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
Fix advanced settings not working if wifiSSIDHidden is not in settings file
- Fix advanced settings not working if users has wifi settings saved with previous version of Imager, and user selected "use always" Ref #343 - Also fix problem where "SSH enabled" is not saved on Mac OS X due to the check assuming QSettings stores settings as strings, while with the plist stuff on Mac OS X it is stored as boolean.
This commit is contained in:
parent
b8222915f8
commit
d91f8d95b1
3 changed files with 16 additions and 5 deletions
|
@ -469,7 +469,7 @@ Popup {
|
|||
chkSetUser.checked = true
|
||||
/* Older imager versions did not have a sshEnabled setting.
|
||||
Assume it is true if it does not exists and sshUserPassword is set */
|
||||
if (!('sshEnabled' in settings) || settings.sshEnabled === "true") {
|
||||
if (!('sshEnabled' in settings) || settings.sshEnabled === "true" || settings.sshEnabled === true) {
|
||||
chkSSH.checked = true
|
||||
radioPasswordAuthentication.checked = true
|
||||
}
|
||||
|
@ -485,7 +485,9 @@ Popup {
|
|||
}
|
||||
if ('wifiSSID' in settings) {
|
||||
fieldWifiSSID.text = settings.wifiSSID
|
||||
chkWifiSSIDHidden.checked = settings.wifiSSIDHidden
|
||||
if ('wifiSSIDHidden' in settings && settings.wifiSSIDHidden) {
|
||||
chkWifiSSIDHidden.checked = true
|
||||
}
|
||||
chkShowPassword.checked = false
|
||||
fieldWifiPassword.text = settings.wifiPassword
|
||||
fieldWifiCountry.currentIndex = fieldWifiCountry.find(settings.wifiCountry)
|
||||
|
@ -798,7 +800,9 @@ Popup {
|
|||
}
|
||||
if (chkWifi.checked) {
|
||||
settings.wifiSSID = fieldWifiSSID.text
|
||||
settings.wifiSSIDHidden = chkWifiSSIDHidden.checked
|
||||
if (chkWifiSSIDHidden.checked) {
|
||||
settings.wifiSSIDHidden = true
|
||||
}
|
||||
settings.wifiPassword = fieldWifiPassword.text
|
||||
settings.wifiCountry = fieldWifiCountry.editText
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue