Launcher: add settings for TerraSync DNS
Add advanced settings to speciofy the TerraSync DNS server. This shoud allow some work-around of problems with some ISP DNS.
This commit is contained in:
parent
28d7308985
commit
a46d71930a
1 changed files with 30 additions and 0 deletions
|
@ -348,6 +348,29 @@ Item {
|
||||||
setIfDefault: true
|
setIfDefault: true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
SettingsComboBox {
|
||||||
|
id: terraSyncDnsMode
|
||||||
|
label: qsTr("TerraSync DNS Server")
|
||||||
|
description: qsTr("Select the DNS server used for TerraSync lookup.")
|
||||||
|
advanced: true
|
||||||
|
choices: [qsTr("Default"), qsTr("Google"), qsTr("Custom DNS Server") ]
|
||||||
|
defaultIndex: 0
|
||||||
|
readonly property bool isGoogle: selectedIndex == 1
|
||||||
|
readonly property bool isCustom: selectedIndex == 2
|
||||||
|
keywords: ["terrasync", "dns", "network", "download", "scenery"]
|
||||||
|
setting: "terrasync-dns-mode"
|
||||||
|
},
|
||||||
|
|
||||||
|
SettingLineEdit {
|
||||||
|
id: terraSyncCustomDns
|
||||||
|
hidden: !terraSyncDnsMode.isCustom
|
||||||
|
label: qsTr("Custom DNS Server")
|
||||||
|
advanced: true
|
||||||
|
description: qsTr("Enter a custom DNS server IP address, for example '8.8.8.8'")
|
||||||
|
// validation: RegExpValidator { regExp: /[\d]{1,7}[\s]*x[\s]*[\d]{1,7}$/ }
|
||||||
|
suggestedWidthString: "255.255.255.255"
|
||||||
|
setting: "terrasync-dns-custom-server"
|
||||||
|
},
|
||||||
|
|
||||||
SettingPathChooser {
|
SettingPathChooser {
|
||||||
id: downloadDir
|
id: downloadDir
|
||||||
|
@ -387,6 +410,13 @@ Item {
|
||||||
// only permitted to occurr once, and we set it via other means;
|
// only permitted to occurr once, and we set it via other means;
|
||||||
// on startup via runLauncherDialog, and if it changes, via
|
// on startup via runLauncherDialog, and if it changes, via
|
||||||
// LauncherMainWindow::downloadDirChanged
|
// LauncherMainWindow::downloadDirChanged
|
||||||
|
|
||||||
|
if (terraSyncDnsMode.isCustom) {
|
||||||
|
_config.setProperty("/sim/terrasync/dns-server", terraSyncCustomDns.value);
|
||||||
|
} else if (terraSyncDnsMode.isGoogle) {
|
||||||
|
// DNSClient.cxx handles this as a special value
|
||||||
|
_config.setProperty("/sim/terrasync/dns-server", "google");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
summary: terrasync.checked ? "scenery downloads;" : ""
|
summary: terrasync.checked ? "scenery downloads;" : ""
|
||||||
|
|
Loading…
Reference in a new issue