diff options
author | jan Iversen <jani@apache.org> | 2018-07-18 20:47:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-25 08:35:04 -0700 |
commit | f1648d297b174024bf772cbd6b482185532e0812 (patch) | |
tree | fd6b7bcc3346cdf0581d8ca91c8529516385517a /core/settings/qPrefCloudStorage.cpp | |
parent | 597aa75348f8282e9a9d6349dd06192740fccd1f (diff) | |
download | subsurface-f1648d297b174024bf772cbd6b482185532e0812.tar.gz |
core: qPref replace COPY_TXT with copy_txt in qPrefPrivate
Add copy_txt function to qPrefPrivate class
Remove macro COPY_TXT from qPrefPrivate.h
Replace use of COPY_TXT with copy_txt in qPref classes
copy_txt is only once, COPY_TXT was expanded approx. 160 times, so
this commit saves space (and removes a macro).
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/settings/qPrefCloudStorage.cpp')
-rw-r--r-- | core/settings/qPrefCloudStorage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp index 68e0bd027..1f6f23ece 100644 --- a/core/settings/qPrefCloudStorage.cpp +++ b/core/settings/qPrefCloudStorage.cpp @@ -35,8 +35,8 @@ void qPrefCloudStorage::set_cloud_base_url(const QString& value) if (value != prefs.cloud_base_url) { // only free and set if not default if (prefs.cloud_base_url != default_prefs.cloud_base_url) { - COPY_TXT(cloud_base_url, value); - COPY_TXT(cloud_git_url, QString(prefs.cloud_base_url) + "/git"); + qPrefPrivate::copy_txt(&prefs.cloud_base_url, value); + qPrefPrivate::copy_txt(&prefs.cloud_git_url, QString(prefs.cloud_base_url) + "/git"); } disk_cloud_base_url(true); @@ -55,7 +55,7 @@ void qPrefCloudStorage::set_cloud_git_url(const QString& value) if (value != prefs.cloud_git_url) { // only free and set if not default if (prefs.cloud_git_url != default_prefs.cloud_git_url) { - COPY_TXT(cloud_git_url, value); + qPrefPrivate::copy_txt(&prefs.cloud_git_url, value); } disk_cloud_git_url(true); emit cloud_git_url_changed(value); @@ -73,7 +73,7 @@ void qPrefCloudStorage::set_cloud_storage_newpassword(const QString& value) if (value == prefs.cloud_storage_newpassword) return; - COPY_TXT(cloud_storage_newpassword, value); + qPrefPrivate::copy_txt(&prefs.cloud_storage_newpassword, value); // NOT saved on disk, because it is only temporary emit cloud_storage_newpassword_changed(value); @@ -83,7 +83,7 @@ GET_PREFERENCE_TXT(CloudStorage, cloud_storage_password); void qPrefCloudStorage::set_cloud_storage_password(const QString& value) { if (value != prefs.cloud_storage_password) { - COPY_TXT(cloud_storage_password,value); + qPrefPrivate::copy_txt(&prefs.cloud_storage_password, value); disk_cloud_storage_password(true); emit cloud_storage_password_changed(value); } |