From 0a01072deb4bd6b5fe78daf7ed5713eaeb73254b Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sun, 8 Dec 2019 13:27:03 +0100 Subject: 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 --- core/settings/qPrefCloudStorage.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'core/settings/qPrefCloudStorage.cpp') 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); +} -- cgit v1.2.3-70-g09d2