mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
3d788414c7
commit
e54f81855d
1 changed files with 9 additions and 3 deletions
|
@ -1089,9 +1089,15 @@ void CloudStorageSettings::setBaseUrl(const QString& value)
|
||||||
{
|
{
|
||||||
if (value == prefs.cloud_base_url)
|
if (value == prefs.cloud_base_url)
|
||||||
return;
|
return;
|
||||||
qDebug() << prefs.cloud_base_url << prefs.cloud_git_url;
|
|
||||||
free((void*)prefs.cloud_base_url);
|
// dont free data segment.
|
||||||
free((void*)prefs.cloud_git_url);
|
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_base_url = copy_string(qPrintable(value));
|
||||||
prefs.cloud_git_url = copy_string(qPrintable(QString(prefs.cloud_base_url) + "/git"));
|
prefs.cloud_git_url = copy_string(qPrintable(QString(prefs.cloud_base_url) + "/git"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue