aboutsummaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefProxy.h
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-14 10:30:07 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-15 16:11:39 -0700
commit9b8a6fa8552647c1c1e7b78000e93a1bbc508365 (patch)
tree4196fe4371cab7e02c5168256e2d6ce380aadbce /core/settings/qPrefProxy.h
parent0825f644e0b98190d68e0b63c4204fa8282e84b4 (diff)
downloadsubsurface-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/qPrefProxy.h')
-rw-r--r--core/settings/qPrefProxy.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/core/settings/qPrefProxy.h b/core/settings/qPrefProxy.h
index abca19c06..e1ead178e 100644
--- a/core/settings/qPrefProxy.h
+++ b/core/settings/qPrefProxy.h
@@ -20,9 +20,9 @@ public:
static qPrefProxy *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 bool proxy_auth() { return prefs.proxy_auth; }
@@ -33,12 +33,12 @@ public:
static QString proxy_user() { return prefs.proxy_user; }
public slots:
- void set_proxy_auth(bool value);
- void set_proxy_host(const QString &value);
- void set_proxy_pass(const QString &value);
- void set_proxy_port(int value);
- void set_proxy_type(int value);
- void set_proxy_user(const QString &value);
+ static void set_proxy_auth(bool value);
+ static void set_proxy_host(const QString &value);
+ static void set_proxy_pass(const QString &value);
+ static void set_proxy_port(int value);
+ static void set_proxy_type(int value);
+ static void set_proxy_user(const QString &value);
signals:
void proxy_auth_changed(bool value);
@@ -49,12 +49,12 @@ signals:
void proxy_user_changed(const QString &value);
private:
- void disk_proxy_auth(bool doSync);
- void disk_proxy_host(bool doSync);
- void disk_proxy_pass(bool doSync);
- void disk_proxy_port(bool doSync);
- void disk_proxy_type(bool doSync);
- void disk_proxy_user(bool doSync);
+ static void disk_proxy_auth(bool doSync);
+ static void disk_proxy_host(bool doSync);
+ static void disk_proxy_pass(bool doSync);
+ static void disk_proxy_port(bool doSync);
+ static void disk_proxy_type(bool doSync);
+ static void disk_proxy_user(bool doSync);
};
#endif