summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neves2012-01-30 16:16:26 +0100
committerMichael Neves2012-01-30 16:16:26 +0100
commite51624c5c40b046381964ce76c00ed157a948ccf (patch)
tree0c455d25beb312616f01168eab3894b6a04de102
parentssl option for fbgui (diff)
downloadfbgui-e51624c5c40b046381964ce76c00ed157a948ccf.tar.gz
fbgui-e51624c5c40b046381964ce76c00ed157a948ccf.tar.xz
fbgui-e51624c5c40b046381964ce76c00ed157a948ccf.zip
Change pbs_url to https if ssl is enabled
-rw-r--r--src/fbgui/main.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/fbgui/main.cpp b/src/fbgui/main.cpp
index 9e29cbd..0a36f32 100644
--- a/src/fbgui/main.cpp
+++ b/src/fbgui/main.cpp
@@ -182,14 +182,6 @@ int main(int argc, char *argv[]) {
QSettings confFileSettings(configFilePath, QSettings::IniFormat);
confFileSettings.setIniCodec("UTF-8");
- // set base URL to be loaded
- if (clOpts.contains("url"))
- baseURL = QUrl(clOpts.value("url"));
- else if (confFileSettings.contains("default/pbs_url"))
- baseURL = confFileSettings.value("default/pbs_url").toUrl();
- else
- baseURL = DEFAULT_URL;
-
// set SSL support
if (clOpts.contains("ssl"))
sslSupport = true;
@@ -198,6 +190,20 @@ int main(int argc, char *argv[]) {
else
sslSupport = DEFAULT_SSL_SUPPORT;
+ // set base URL to be loaded
+ if (clOpts.contains("url"))
+ baseURL = QUrl(clOpts.value("url"));
+ else if (confFileSettings.contains("default/pbs_url")){
+ baseURL = confFileSettings.value("default/pbs_url").toUrl();
+ }
+ else
+ baseURL = DEFAULT_URL;
+
+ if(sslSupport)
+ baseURL.setScheme("https");
+
+
+
// set directory for downloads
if (clOpts.contains("downloadDir"))
downloadPath = clOpts.value("downloadDir");