mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
QML UI: different functions for saving Preferences and Cloud Credentials
Tapping Save on those two pages should only update the data that are actually available on those pages. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7a94360a6d
commit
a0b83dc2f1
3 changed files with 8 additions and 3 deletions
|
@ -72,7 +72,7 @@ Item {
|
|||
manager.cloudUserName = login.text
|
||||
manager.cloudPassword = password.text
|
||||
manager.saveCloudPassword = savePassword.checked
|
||||
manager.savePreferences()
|
||||
manager.saveCloudCredentials()
|
||||
stackView.pop()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,13 +42,17 @@ QMLManager::~QMLManager()
|
|||
void QMLManager::savePreferences()
|
||||
{
|
||||
QSettings s;
|
||||
bool cloudCredentialsChanged = false;
|
||||
s.beginGroup("LocationService");
|
||||
s.setValue("time_threshold", timeThreshold() * 60);
|
||||
prefs.time_threshold = timeThreshold() * 60;
|
||||
s.setValue("distance_threshold", distanceThreshold());
|
||||
prefs.distance_threshold = distanceThreshold();
|
||||
s.endGroup();
|
||||
}
|
||||
|
||||
void QMLManager::saveCloudCredentials()
|
||||
{
|
||||
QSettings s;
|
||||
bool cloudCredentialsChanged = false;
|
||||
s.beginGroup("CloudStorage");
|
||||
s.setValue("email", cloudUserName());
|
||||
s.setValue("save_password_local", saveCloudPassword());
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void savePreferences();
|
||||
void saveCloudCredentials();
|
||||
void loadDives();
|
||||
void commitChanges(QString diveId, QString suit, QString buddy, QString diveMaster, QString notes);
|
||||
void saveChanges();
|
||||
|
|
Loading…
Add table
Reference in a new issue