summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefCloudStorage.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-11-27 18:32:57 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-11 12:36:43 -0500
commit42939ab7f88469d1cbf3e4f4369eea9e58d7a847 (patch)
treea3cd89a82340e2d1b4150d17a54075106763f2be /core/settings/qPrefCloudStorage.cpp
parent5aba24248f8b11baef6c10c36a6fdf07ebb001ee (diff)
downloadsubsurface-42939ab7f88469d1cbf3e4f4369eea9e58d7a847.tar.gz
core/settings: extend qPrefCloudStorage with divelogsde user info
Add divelogsde_userid and divelogsde_password to qPrefCloudStorage to be used in Export.qml Extending qPrefCloudStorage is more logical than adding QSettings (and securing the same behaviour) outside qPref. Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'core/settings/qPrefCloudStorage.cpp')
-rw-r--r--core/settings/qPrefCloudStorage.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp
index 675e379d6..24b73394b 100644
--- a/core/settings/qPrefCloudStorage.cpp
+++ b/core/settings/qPrefCloudStorage.cpp
@@ -78,7 +78,6 @@ HANDLE_PREFERENCE_INT(CloudStorage, "cloud_verification_status", cloud_verificat
HANDLE_PREFERENCE_BOOL(CloudStorage, "save_password_local", save_password_local);
-
QString qPrefCloudStorage::diveshare_uid()
{
return qPrefPrivate::propValue(keyFromGroupAndName("", "diveshareExport/uid"), "").toString();
@@ -98,3 +97,24 @@ void qPrefCloudStorage::set_diveshare_private(bool value)
qPrefPrivate::propSetValue(keyFromGroupAndName("", "diveshareExport/private"), value, false);
emit instance()->diveshare_privateChanged(value);
}
+
+QString qPrefCloudStorage::divelogde_user()
+{
+ return qPrefPrivate::propValue(keyFromGroupAndName("", "divelogde_user"), "").toString();
+}
+void qPrefCloudStorage::set_divelogde_user(const QString &value)
+{
+ qPrefPrivate::propSetValue(keyFromGroupAndName("", "divelogde_user"), value, "");
+ emit instance()->divelogde_userChanged(value);
+}
+
+
+QString qPrefCloudStorage::divelogde_pass()
+{
+ return qPrefPrivate::propValue(keyFromGroupAndName("", "divelogde_pass"), "").toString();
+}
+void qPrefCloudStorage::set_divelogde_pass(const QString &value)
+{
+ qPrefPrivate::propSetValue(keyFromGroupAndName("", "divelogde_pass"), value, "");
+ emit instance()->divelogde_passChanged(value);
+}