From 85dfdaa3e50398d090b3ae5f3cc3159f7fb82887 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Wed, 27 Sep 2017 18:27:12 +0200 Subject: mobile: only deal with localrepo in NOCLOUD mode This is a very subtile bug. Testing/developing on the desktop for mobile, with a normal logbook in a git repo, resulted in a surprising effect. When swichting from a cloud account to a NOCLOUD situation, the no cloud repo was (not always) reset to the NOCLOUD_LOCALSTORAGE, but to the normal logbook. Resuling in commits in the wrong repo. This can easily be solved by setting the filename to NOCLOUD_LOCALSTORAGE, when switching to NOCLOUD mode. Signed-off-by: Jan Mulder --- mobile-widgets/qmlmanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qmlmanager.cpp') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 6292f95fe..e30d7ca9a 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1413,8 +1413,10 @@ QMLManager::cloud_status_qml QMLManager::credentialStatus() const void QMLManager::setCredentialStatus(const cloud_status_qml value) { if (m_credentialStatus != value) { - if (value == CS_NOCLOUD) + if (value == CS_NOCLOUD) { appendTextToLog("Switching to no cloud mode"); + set_filename(NOCLOUD_LOCALSTORAGE, true); + } m_credentialStatus = value; emit credentialStatusChanged(); } -- cgit v1.2.3-70-g09d2