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
@ -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…
x
Reference in New Issue
Block a user