mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
0825f644e0
commit
9b8a6fa855
22 changed files with 349 additions and 348 deletions
|
@ -17,9 +17,9 @@ public:
|
|||
static qPrefFacebook *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 access_token() { return prefs.facebook.access_token; }
|
||||
|
@ -27,9 +27,9 @@ public:
|
|||
static QString user_id() { return prefs.facebook.user_id; }
|
||||
|
||||
public slots:
|
||||
void set_access_token(const QString& value);
|
||||
void set_album_id(const QString& value);
|
||||
void set_user_id(const QString& value);
|
||||
static void set_access_token(const QString& value);
|
||||
static void set_album_id(const QString& value);
|
||||
static void set_user_id(const QString& value);
|
||||
|
||||
signals:
|
||||
void access_token_changed(const QString& value);
|
||||
|
@ -37,9 +37,9 @@ signals:
|
|||
void user_id_changed(const QString& value);
|
||||
|
||||
private:
|
||||
void disk_access_token(bool doSync);
|
||||
void disk_album_id(bool doSync);
|
||||
void disk_user_id(bool doSync);
|
||||
static void disk_access_token(bool doSync);
|
||||
static void disk_album_id(bool doSync);
|
||||
static void disk_user_id(bool doSync);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue