diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-08-28 20:10:17 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-08-28 20:01:00 -0700 |
commit | e54f81855dc49e302e42e17538256fe738dba73f (patch) | |
tree | 46f7a339cdb70dd8ac51991eab14586efc3bdf4b /core/subsurface-qt/SettingsObjectWrapper.cpp | |
parent | 3d788414c730e45f04ae9d56c8d4afd6c06d0ea7 (diff) | |
download | subsurface-e54f81855dc49e302e42e17538256fe738dba73f.tar.gz |
Settings update: Fix cloud_git_url
I was freeing data segment, sigh.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp index edb5ad804..55670eb22 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/core/subsurface-qt/SettingsObjectWrapper.cpp @@ -1089,9 +1089,15 @@ void CloudStorageSettings::setBaseUrl(const QString& value) { if (value == prefs.cloud_base_url) return; - qDebug() << prefs.cloud_base_url << prefs.cloud_git_url; - free((void*)prefs.cloud_base_url); - free((void*)prefs.cloud_git_url); + + // dont free data segment. + if (prefs.cloud_base_url != default_prefs.cloud_base_url) { + free((void*)prefs.cloud_base_url); + free((void*)prefs.cloud_git_url); + } + QSettings s; + s.beginGroup(group); + s.setValue("cloud_base_url", value); prefs.cloud_base_url = copy_string(qPrintable(value)); prefs.cloud_git_url = copy_string(qPrintable(QString(prefs.cloud_base_url) + "/git")); } |