mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core/settings: optimize base_url functions.
Remove unused variable and create of QString. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
178c01baf5
commit
7129ad92a4
1 changed files with 1 additions and 2 deletions
|
@ -28,12 +28,11 @@ void qPrefCloudStorage::loadSync(bool doSync)
|
|||
|
||||
void qPrefCloudStorage::set_cloud_base_url(const QString &value)
|
||||
{
|
||||
QString valueGit = value + "/git";
|
||||
if (value != prefs.cloud_base_url) {
|
||||
// only free and set if not default
|
||||
if (prefs.cloud_base_url != default_prefs.cloud_base_url) {
|
||||
qPrefPrivate::copy_txt(&prefs.cloud_base_url, value);
|
||||
qPrefPrivate::copy_txt(&prefs.cloud_git_url, QString(prefs.cloud_base_url) + "/git");
|
||||
qPrefPrivate::copy_txt(&prefs.cloud_git_url, value + "/git");
|
||||
}
|
||||
|
||||
disk_cloud_base_url(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue