mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make qPrefAnimations/CloudStorage getters static and inline
Add static and inline to getter in all qPref header files Remove call to GET_PREFERENCE_* in qPrefDisplay.cpp Remove GET_PREFERENCE_* from qPrefPrivate.h static inline is slightly faster than a function call, but it saves a lot of coding lines (no lines in qPref*.cpp). Getters are a direct reference to struct preferences, so they will normally only be used from QML. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
87d8963c78
commit
3eae683b57
4 changed files with 16 additions and 55 deletions
|
@ -29,7 +29,6 @@ void qPrefCloudStorage::loadSync(bool doSync)
|
|||
disk_userid(doSync);
|
||||
}
|
||||
|
||||
GET_PREFERENCE_TXT(CloudStorage, cloud_base_url);
|
||||
void qPrefCloudStorage::set_cloud_base_url(const QString& value)
|
||||
{
|
||||
if (value != prefs.cloud_base_url) {
|
||||
|
@ -49,7 +48,6 @@ void qPrefCloudStorage::disk_cloud_base_url(bool doSync)
|
|||
LOADSYNC_TXT("/cloud_git_url", cloud_git_url);
|
||||
}
|
||||
|
||||
GET_PREFERENCE_TXT(CloudStorage, cloud_git_url);
|
||||
void qPrefCloudStorage::set_cloud_git_url(const QString& value)
|
||||
{
|
||||
if (value != prefs.cloud_git_url) {
|
||||
|
@ -67,7 +65,6 @@ HANDLE_PREFERENCE_TXT(CloudStorage, "/email", cloud_storage_email);
|
|||
|
||||
HANDLE_PREFERENCE_TXT(CloudStorage, "/email_encoded", cloud_storage_email_encoded);
|
||||
|
||||
GET_PREFERENCE_TXT(CloudStorage, cloud_storage_newpassword);
|
||||
void qPrefCloudStorage::set_cloud_storage_newpassword(const QString& value)
|
||||
{
|
||||
if (value == prefs.cloud_storage_newpassword)
|
||||
|
@ -79,7 +76,6 @@ void qPrefCloudStorage::set_cloud_storage_newpassword(const QString& value)
|
|||
emit cloud_storage_newpassword_changed(value);
|
||||
}
|
||||
|
||||
GET_PREFERENCE_TXT(CloudStorage, cloud_storage_password);
|
||||
void qPrefCloudStorage::set_cloud_storage_password(const QString& value)
|
||||
{
|
||||
if (value != prefs.cloud_storage_password) {
|
||||
|
@ -106,7 +102,6 @@ HANDLE_PREFERENCE_BOOL(CloudStorage, "/save_password_local", save_password_local
|
|||
|
||||
HANDLE_PREFERENCE_BOOL(CloudStorage, "/save_userid_local", save_userid_local);
|
||||
|
||||
GET_PREFERENCE_TXT(CloudStorage, userid);
|
||||
SET_PREFERENCE_TXT(CloudStorage, userid);
|
||||
void qPrefCloudStorage::disk_userid(bool doSync)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue