diff options
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")); } |