summaryrefslogtreecommitdiffstats
path: root/core/settings
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-11 16:02:02 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 15:38:20 -0700
commit19e8fa4eafc1f67ddd70230f051f5988a38f7d49 (patch)
tree1a4c783c08152490bac9f3a0afe86ffee8e061f3 /core/settings
parentbb0ac5f7784acec930b5131bfb25f0c4b5fa2f3b (diff)
downloadsubsurface-19e8fa4eafc1f67ddd70230f051f5988a38f7d49.tar.gz
Cleanup[5/6]: remove unused preferences
Remove all the code to handle the preferences itself. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/settings')
-rw-r--r--core/settings/qPrefCloudStorage.cpp21
-rw-r--r--core/settings/qPrefCloudStorage.h10
2 files changed, 0 insertions, 31 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp
index ff9ad2553..d8aa92094 100644
--- a/core/settings/qPrefCloudStorage.cpp
+++ b/core/settings/qPrefCloudStorage.cpp
@@ -24,8 +24,6 @@ void qPrefCloudStorage::loadSync(bool doSync)
disk_cloud_timeout(doSync);
disk_cloud_verification_status(doSync);
disk_save_password_local(doSync);
- disk_save_userid_local(doSync);
- disk_userid(doSync);
}
void qPrefCloudStorage::set_cloud_base_url(const QString &value)
@@ -81,22 +79,3 @@ HANDLE_PREFERENCE_INT(CloudStorage, "timeout", cloud_timeout);
HANDLE_PREFERENCE_INT(CloudStorage, "cloud_verification_status", cloud_verification_status);
HANDLE_PREFERENCE_BOOL(CloudStorage, "save_password_local", save_password_local);
-
-HANDLE_PREFERENCE_BOOL(CloudStorage, "save_userid_local", save_userid_local);
-
-SET_PREFERENCE_TXT(CloudStorage, userid);
-void qPrefCloudStorage::disk_userid(bool doSync)
-{
- if (doSync) {
- // always save in new position (part of cloud storage group)
- qPrefPrivate::propSetValue(keyFromGroupAndName(group, "subsurface_webservice_uid"), prefs.userid, default_prefs.userid);
- } else {
- //WARNING: UserId was stored outside of any group.
- // try to read from new location, if it fails read from old location
- prefs.userid = copy_qstring(qPrefPrivate::propValue(keyFromGroupAndName(group, "subsurface_webservice_uid"), "NoUserIdHere").toString());
- if (QString(prefs.userid) == "NoUserIdHere") {
- const QString group = QStringLiteral("");
- prefs.userid = copy_qstring(qPrefPrivate::propValue(keyFromGroupAndName(group,"subsurface_webservice_uid"), default_prefs.userid).toString());
- }
- }
-}
diff --git a/core/settings/qPrefCloudStorage.h b/core/settings/qPrefCloudStorage.h
index 751b67675..d8beda9d0 100644
--- a/core/settings/qPrefCloudStorage.h
+++ b/core/settings/qPrefCloudStorage.h
@@ -16,8 +16,6 @@ class qPrefCloudStorage : public QObject {
Q_PROPERTY(int cloud_verification_status READ cloud_verification_status WRITE set_cloud_verification_status NOTIFY cloud_verification_status_changed);
Q_PROPERTY(int cloud_timeout READ cloud_timeout WRITE set_cloud_timeout NOTIFY cloud_timeout_changed);
Q_PROPERTY(bool save_password_local READ save_password_local WRITE set_save_password_local NOTIFY save_password_local_changed);
- Q_PROPERTY(bool save_userid_local READ save_userid_local WRITE set_save_userid_local NOTIFY save_userid_local_changed);
- Q_PROPERTY(QString userid READ userid WRITE set_userid NOTIFY userid_changed);
public:
qPrefCloudStorage(QObject *parent = NULL);
@@ -38,8 +36,6 @@ public:
static int cloud_timeout() { return prefs.cloud_timeout; }
static int cloud_verification_status() { return prefs.cloud_verification_status; }
static bool save_password_local() { return prefs.save_password_local; }
- static bool save_userid_local() { return prefs.save_userid_local; }
- static QString userid() { return prefs.userid; }
public slots:
static void set_cloud_base_url(const QString &value);
@@ -50,8 +46,6 @@ public slots:
static void set_cloud_timeout(int value);
static void set_cloud_verification_status(int 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);
@@ -62,8 +56,6 @@ signals:
void cloud_timeout_changed(int value);
void cloud_verification_status_changed(int value);
void save_password_local_changed(bool value);
- void save_userid_local_changed(bool value);
- void userid_changed(const QString &value);
private:
// functions to load/sync variable with disk
@@ -75,8 +67,6 @@ private:
static void disk_cloud_timeout(bool doSync);
static void disk_cloud_verification_status(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