aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-10 21:38:44 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-10 21:38:44 -0800
commit60d546331180df1b5cad61ce1646afdfb2ef522f (patch)
tree73d2aca3647c71bcb13b74e9d13d51e60024b1e3
parenta3af5331ea90d5d3c3cafaaf13a9a44739f975c1 (diff)
downloadsubsurface-60d546331180df1b5cad61ce1646afdfb2ef522f.tar.gz
Remember in settings if we ever synced with the cloud
Otherwise, if the device is offline we would not be able to store changes in the local cache, completely defeating the purpose. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-mobile/qmlmanager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 7d50884ab..dd15f429d 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -54,6 +54,9 @@ QMLManager::QMLManager() :
// create location manager service
locationProvider = new GpsLocation(&appendTextToLogStandalone, this);
set_git_update_cb(&gitProgressCB);
+ QSettings s;
+ if (s.contains("setLoadFromCloud") && s.value("setLoadFromCloud").toInt() == 1)
+ setLoadFromCloud(true);
}
void QMLManager::finishSetup()
@@ -646,6 +649,8 @@ bool QMLManager::loadFromCloud() const
void QMLManager::setLoadFromCloud(bool done)
{
+ QSettings s;
+ s.setValue("loadFromCloud", 1);
m_loadFromCloud = done;
emit loadFromCloudChanged();
}