summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefCloudStorage.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-08 13:27:03 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-11 11:08:51 -0500
commit0a01072deb4bd6b5fe78daf7ed5713eaeb73254b (patch)
treed433b8312bfc59afdc58072d70115fea5aa723f6 /core/settings/qPrefCloudStorage.cpp
parent2949ea0fd95ecca6f6435b9aecce84f65de2987b (diff)
downloadsubsurface-0a01072deb4bd6b5fe78daf7ed5713eaeb73254b.tar.gz
core/settings: extend qPrefCloudStorage with diveshare uid/private
Add diveshare/uid and diveshare/private to qPrefCloudStorage to be used in Export.qml as well as diveshareexportdialog 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.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp
index 26a0787e6..675e379d6 100644
--- a/core/settings/qPrefCloudStorage.cpp
+++ b/core/settings/qPrefCloudStorage.cpp
@@ -77,3 +77,24 @@ 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);
+
+
+QString qPrefCloudStorage::diveshare_uid()
+{
+ return qPrefPrivate::propValue(keyFromGroupAndName("", "diveshareExport/uid"), "").toString();
+}
+void qPrefCloudStorage::set_diveshare_uid(const QString &value)
+{
+ qPrefPrivate::propSetValue(keyFromGroupAndName("", "diveshareExport/uid"), value, "");
+ emit instance()->diveshare_uidChanged(value);
+}
+
+bool qPrefCloudStorage::diveshare_private()
+{
+ return qPrefPrivate::propValue(keyFromGroupAndName("", "diveshareExport/private"), "").toBool();
+}
+void qPrefCloudStorage::set_diveshare_private(bool value)
+{
+ qPrefPrivate::propSetValue(keyFromGroupAndName("", "diveshareExport/private"), value, false);
+ emit instance()->diveshare_privateChanged(value);
+}