diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-09-09 13:15:14 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-29 08:13:25 -0700 |
commit | 2e91de9d950aa77b9bd181d422a0d5c3ed014079 (patch) | |
tree | df46a1b169e15e7d8dd32bbefeae26f0cd3f1a13 /mobile-widgets/qmlmanager.cpp | |
parent | e903c6bd1ae0eb8dd07c4ea2ab7e6c4170d0b385 (diff) | |
download | subsurface-2e91de9d950aa77b9bd181d422a0d5c3ed014079.tar.gz |
mobile: initialize credential data in one place
It appears that the onCompleted of the StartPage item is triggered
before the onCompleted of the rootItem. This is logical as the
Startpage is a child of the rootItem. And, yes, this does matter.
As the divelist also contains the logic for initial cloud
registration (and is the default page shown in a state where
the cloud credentials are valid (CS_VERIFIED state)), we need to
know the correct credential state at start of the app.
The move of this one line of code makes sure of that, in addition
to setting the credential state from the preferences. Now, the
setupActions function can reference correct credential data.
This is further preparation for a better cloud creation
process from mobile.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 7a132a13e..94e58900b 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -221,6 +221,7 @@ void QMLManager::finishSetup() setCloudUserName(prefs.cloud_storage_email); setCloudPassword(prefs.cloud_storage_password); setSyncToCloud(!prefs.git_local_only); + setCredentialStatus((cloud_status_qml) prefs.cloud_verification_status); // if the cloud credentials are valid, we should get the GPS Webservice ID as well QString url; if (!cloudUserName().isEmpty() && |