mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
2949ea0fd9
commit
0a01072deb
2 changed files with 29 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue