diff options
author | jan Iversen <jani@apache.org> | 2018-08-14 10:30:07 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-15 16:11:39 -0700 |
commit | 9b8a6fa8552647c1c1e7b78000e93a1bbc508365 (patch) | |
tree | 4196fe4371cab7e02c5168256e2d6ce380aadbce /core/settings/qPrefCloudStorage.h | |
parent | 0825f644e0b98190d68e0b63c4204fa8282e84b4 (diff) | |
download | subsurface-9b8a6fa8552647c1c1e7b78000e93a1bbc508365.tar.gz |
core: make methods in qPref* static
Make methods static to allow fast and esay access
use qPrefXYZ::foo() instead of qPrefXYZ::instance()->foo()
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/settings/qPrefCloudStorage.h')
-rw-r--r-- | core/settings/qPrefCloudStorage.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/core/settings/qPrefCloudStorage.h b/core/settings/qPrefCloudStorage.h index 6f32aef95..91864afbc 100644 --- a/core/settings/qPrefCloudStorage.h +++ b/core/settings/qPrefCloudStorage.h @@ -26,9 +26,9 @@ public: static qPrefCloudStorage *instance(); // Load/Sync local settings (disk) and struct preference - void loadSync(bool doSync); - void load() { loadSync(false); } - void sync() { loadSync(true); } + static void loadSync(bool doSync); + static void load() { loadSync(false); } + static void sync() { loadSync(true); } public: static QString cloud_base_url() { return prefs.cloud_base_url; } @@ -46,18 +46,18 @@ public: static QString userid() { return prefs.userid; } public slots: - void set_cloud_base_url(const QString &value); - void set_cloud_storage_email(const QString &value); - void set_cloud_storage_email_encoded(const QString &value); - void set_cloud_storage_newpassword(const QString &value); - void set_cloud_storage_password(const QString &value); - void set_cloud_storage_pin(const QString &value); - void set_cloud_timeout(int value); - void set_cloud_verification_status(int value); - void set_git_local_only(bool value); - void set_save_password_local(bool value); - void set_save_userid_local(bool value); - void set_userid(const QString &value); + static void set_cloud_base_url(const QString &value); + static void set_cloud_storage_email(const QString &value); + static void set_cloud_storage_email_encoded(const QString &value); + static void set_cloud_storage_newpassword(const QString &value); + static void set_cloud_storage_password(const QString &value); + static void set_cloud_storage_pin(const QString &value); + static void set_cloud_timeout(int value); + static void set_cloud_verification_status(int value); + static void set_git_local_only(bool value); + static void set_save_password_local(bool value); + static void set_save_userid_local(bool value); + static void set_userid(const QString &value); signals: void cloud_base_url_changed(const QString &value); @@ -75,18 +75,18 @@ signals: private: // functions to load/sync variable with disk - void disk_cloud_base_url(bool doSync); - void disk_cloud_storage_email(bool doSync); - void disk_cloud_storage_email_encoded(bool doSync); - void disk_cloud_storage_newpassword(bool doSync); - void disk_cloud_storage_password(bool doSync); - void disk_cloud_storage_pin(bool doSync); - void disk_cloud_timeout(bool doSync); - void disk_cloud_verification_status(bool doSync); - void disk_git_local_only(bool doSync); - void disk_save_password_local(bool doSync); - void disk_save_userid_local(bool doSync); - void disk_userid(bool doSync); + static void disk_cloud_base_url(bool doSync); + static void disk_cloud_storage_email(bool doSync); + static void disk_cloud_storage_email_encoded(bool doSync); + static void disk_cloud_storage_newpassword(bool doSync); + static void disk_cloud_storage_password(bool doSync); + static void disk_cloud_storage_pin(bool doSync); + static void disk_cloud_timeout(bool doSync); + static void disk_cloud_verification_status(bool doSync); + static void disk_git_local_only(bool doSync); + static void disk_save_password_local(bool doSync); + static void disk_save_userid_local(bool doSync); + static void disk_userid(bool doSync); }; #endif |