mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: keep cloud sync enabled state in settings
So if the app gets closed and restarted, it will continue to not sync (or sync) over the network. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bb74144860
commit
f7564c2b77
2 changed files with 5 additions and 0 deletions
|
@ -1049,6 +1049,10 @@ void QMLManager::setSyncToCloud(bool status)
|
|||
m_syncToCloud = status;
|
||||
prefs.git_local_only = !status;
|
||||
prefs.cloud_background_sync = status;
|
||||
QSettings s;
|
||||
s.beginGroup("CloudStorage");
|
||||
s.setValue("git_local_only", prefs.git_local_only);
|
||||
s.setValue("cloud_background_sync", prefs.cloud_background_sync);
|
||||
emit syncToCloudChanged();
|
||||
}
|
||||
|
||||
|
|
|
@ -1491,6 +1491,7 @@ void loadPreferences()
|
|||
}
|
||||
GET_INT("cloud_verification_status", cloud_verification_status);
|
||||
GET_BOOL("cloud_background_sync", cloud_background_sync);
|
||||
GET_BOOL("git_local_only", git_local_only);
|
||||
|
||||
// creating the git url here is simply a convenience when C code wants
|
||||
// to compare against that git URL - it's always derived from the base URL
|
||||
|
|
Loading…
Add table
Reference in a new issue