summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-08 12:33:07 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-08 12:34:29 -0700
commit685d31cd4fda38c5d7c410356bbb2398d6dc2867 (patch)
treedf256368c504dbd18670a7e48141557de32bfd22 /mobile-widgets/qmlmanager.cpp
parenteefda2b090b9c802051f60b95078993d312a8a1d (diff)
downloadsubsurface-685d31cd4fda38c5d7c410356bbb2398d6dc2867.tar.gz
Simplify code - we now can rely on git_local_only to do the right thing
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index aba3ce3c8..62652361b 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -754,19 +754,15 @@ void QMLManager::saveChangesLocal()
}
alreadySaving = true;
bool glo = prefs.git_local_only;
- bool cbs = prefs.cloud_background_sync;
prefs.git_local_only = true;
- prefs.cloud_background_sync = false;
if (save_dives(existing_filename)) {
appendTextToLog(get_error_string());
setAccessingCloud(-1);
prefs.git_local_only = glo;
- prefs.cloud_background_sync = cbs;
alreadySaving = false;
return;
}
prefs.git_local_only = glo;
- prefs.cloud_background_sync = cbs;
mark_divelist_changed(false);
git_storage_update_progress(false, "done with local save");
alreadySaving = false;
@@ -783,7 +779,6 @@ void QMLManager::saveChangesCloud()
return;
}
bool glo = prefs.git_local_only;
- bool cbs = prefs.cloud_background_sync;
// first we need to store any unsaved changes to the local repo
saveChangesLocal();
if (alreadySaving) {
@@ -797,7 +792,6 @@ void QMLManager::saveChangesCloud()
git_storage_update_progress(false, "finished syncing dive list to cloud server");
setAccessingCloud(-1);
prefs.git_local_only = glo;
- prefs.cloud_background_sync = cbs;
alreadySaving = false;
}
@@ -1117,11 +1111,9 @@ 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();
}