summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-12-29tests: fix TestQPrefUnitsGravatar Dirk Hohndel
This clearly never was tested. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove qmlprefs.*Gravatar jan Iversen
class is not longer used, remove it. (also from qml) Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29QML: remove registration of qmlprefsGravatar jan Iversen
It is no longer used. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: use oldStatus in qmlmanagerGravatar jan Iversen
Switch oldStatus from qmlprefs to qmlmanager This is the last use of QMLPrefs, which can later be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: add oldStatus variable to qmlmanagerGravatar jan Iversen
oldStatus() is kept in qmlPrefs during the login process to allow for a couple of special cases: - if a user have added dives in NO_CLOUD mode and changes to use the cloud these dives are copied to the Cloud, instead of being lost. - if a user does a bailout from the login process (this should not happen anymore) the old status is restored. The pure solution would be to have oldStatus at the top level (e.g. a property in qml) and only change it when actually being in the login process, however due to way the qmlmanager is written it proved very difficult and not worth the effort. In order to be able to remove qmlPrefs, oldStatus are moved to qmlManager. This commit only contain the creation of the variable and the supporting code. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove showPin from qmlprefsGravatar jan Iversen
showPin is no longer used so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove showPin from qmlmanagerGravatar jan Iversen
Setting showPin is no longer needed, so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets/qml: remove prefs.showPinGravatar jan Iversen
prefs.showpin is the same as PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY but is actually implemented as a separate variable. Removing showPin in order to limit use of QMLPrefs, which is the overall goal. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus() from qmlprefsGravatar jan Iversen
Remove no longer used function setCredentialStatus() from qmlprefs. This is done to secure there are no missing setCredentialStatus calls in the code. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove second setCredentialStatus()Gravatar jan Iversen
call setOldStatus() and set_filename(). saveCredentials() will adjust email and password. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove first setCredentialStatus() in finishSetup()Gravatar jan Iversen
This setCredentialStatus() will never do anything, because qPrefCloudStorage is identical to prefs.cloud_verification_status, and can thus be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus() from saveCloudCredentials()Gravatar jan Iversen
Revert to the divelist by setting oldStatus() directly to set_cloud_verification_status() This is done to further limit the use of setCredentialStatus() and prepare to remove qmlPrefs. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus from revertToNoCloudIfNeededGravatar jan Iversen
Update revertToNoCloudIfNeeded() to not use setCredentialStatus() by adding an extra call to setOldStatus() setOldStatus() is called in setCredentialStatus together with set_cloud_verification_status() therefore these 2 calls need to added when removing setCredentialStatus(). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: replace simple setCredentialStatusGravatar jan Iversen
qmlprefs::setCredentialStatus() basically only does something when called with CS_NOCLOUD. A number of setCredentialStatus() calls happen where status cannot be CS_NOCLOUD, and therefore setCredentialStatus() can be safely replaced with set_cloud_verification_status() This limits the use of qmlprefs::setCredentialStatus(), but there are still a couple of more complicated calls. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: credentialStatus() -> cloud_verification_status()Gravatar jan Iversen
Replace all credentialStatus() with cloud_verification_status() Where both prefs.credentialStatus and PrefCloudStorage.cloud_verification_status are being set, remove prefs.credentialStatus. These replacements are valid since credentialStatus() is a simple envelope over cloud_verification_status(). Also remove qmlPrefs::credentialStatus() from qmlPrefs (mostly to ensure no replacements was forgotten). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove m_cloudCredentialStatus in qmlprefGravatar jan Iversen
Remove m_credentialStatus in qmlpref, but let the setter/getter stay, using qPrefCloudStorage::cloud_verification_status() instead. This change ensures that qmlPrefs:credentialStatus() returns the same as qPrefCloudStorage::cloud_verification_status(), and the setter/getter of credentialStatus can later be removed safely. This is a "checkpoint" to ensure everything works without a temporary credentialStatus. No code part depend on the difference between qmlPrefs::credentialStatus() and qPrefCloudStorage::cloud_verification_status(), but the code reference both. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-30backendShared: correct set_verbatim_plan in plannerShared.Gravatar jan Iversen
Correct copy/paste error, set_verbatim_plan() should not call setSacFactor() but setVerbatim(). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28tests: fix cmake syntax confusionGravatar Dirk Hohndel
You cannot have a conditional in the middle of a list. I should have caught this in review. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: correct missing parm in saveCredentials() callGravatar jan Iversen
Add missing empty pin ("") in saveCredentials() call. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: prefs.credentialStatus -> PrefCloudStorageGravatar jan Iversen
Remove use of prefs. (apart from instanciating the object) in main.qml Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: "Add dive manually" is always allowedGravatar jan Iversen
Since the divelist is only visible if online/offline (CS_VERIFIED/CS_NOCLOUD), there is no need to check that to enable "Add dive manually". Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: don't offer manual sync to cloud in no-cloud modeGravatar jan Iversen
Manual sync was enabled both for CS_VERIFIED (online) and CS_NOCLOUD (offline) and then in the trigger CS_NOCLOUD lead to a login screen, potentially confusing the user. Only enable manual sync with verified cloud credentials. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove use of prefs. in DiveList.qmlGravatar jan Iversen
prefs. is only important during the signin process, so use the standard PrefCloudStorage variable Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove cloudPin from qmlprefsGravatar jan Iversen
cloudPin is no longer used, remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove cloudPin() from qmlmanagerGravatar jan Iversen
cloudPin does only have the values "" and NULL, so replace cloudPin() with "" in csa->backend() call remove setting of cloudPin to "" Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widget: simplify saveCredentials() in qmlmanagerGravatar jan Iversen
cloudPin is only set to "" and NULL, therefore and "if" checking if cloudPin is not empty will never have affect. Remove else part. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: make verifyCredentials() an internal functionGravatar jan Iversen
Move verifyCredentials() from public slots to private, eliminating the need to MOC and making the C++/QML interface on function less complicated. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: make saveCredentials() an atomGravatar jan Iversen
Add pin parameter to saveCredentials() thereby having all info about credentials in one function call. Add "" as pin in saveCredentials() - main.qml, when verifying credentials. replace verifyCredentials() with saveCredentials() in the register button on the pin page. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove clearCredentials()Gravatar jan Iversen
clearCredentials() was only called from one place (in the same file), copy functionality and remove function. It was declared as a public slot, so this saves a little bit of overhead too. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove cancelCredentialsPinSetup() from qmlprefsGravatar jan Iversen
cancelCredentialsPinSetup() is no longer used, so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: don't call cancelCredentialsPinSetup()Gravatar jan Iversen
Copy functionality from cancelCredentialsPinSetup() into Cancel in CloudCredentials.qml, this is part of the general qmlprefs cleanup. Remove rootItem.returnTopPage() since the user stays on this page (sees credentials again). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove cancelCredentialsPinSetup() from SettingsGravatar jan Iversen
For now just copy the functionality into Settings.qml, this is part of the qmlprefs cleanup. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: correct reference to credentialStatusGravatar jan Iversen
PrefCloudStorage uses cloud_verification_status where qmlprefs uses credentialStatus Corrected reference. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove property credentialStatusGravatar jan Iversen
Property is unused, remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29tests: add gas tests for plannerSharedGravatar jan Iversen
Add cases to test gas options. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-29tests: add research values for diveplanning.Gravatar jan Iversen
This commit contains the researched values used for diveplanning, which form the basis for the test cases. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-29Update CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: add menu item for cloud password resetGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: restructure help/support menuGravatar Dirk Hohndel
Instead of having two entries on the main menu, move them into a sub menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile: small whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: add support and account iconsGravatar Dirk Hohndel
These were again copied from the material design icon set and will be used to differentiate the various help topics. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: add back button to planner menuGravatar Dirk Hohndel
Otherwise you are stuck in there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: remove confusing gDrawer idGravatar Dirk Hohndel
The global drawer already has a name that can be referenced. This was adding confusion as now both names were used in the menu structure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets/qml: add "forgot password" buttonGravatar jan Iversen
The user is most likely to find out, that he does not remember the password, when asked for it. Add "forgot password" button in the signin dialog (both credentials and pin dialog). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28mobile-widgets: correct faulty connect.Gravatar jan Iversen
1) add comment line (signal to signal) 2) correct spelling error in comment 3) correct connect Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28planner: correct rating calculations.Gravatar jan Iversen
Test show that the ratings calculations were off by +/- 1, due to rounding errors. Found due to test cases in tests (other commits) The calculations are copied 1-1 from diveplanner.cpp, but are used slightly different in plannerShared.cpp Correct calculations, by securing the calculation is done with float precision and the rounded with lrint(). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28mobile-widgets/qml: correct first view of divelistGravatar jan Iversen
pageStack.initPage cannot be used as a function and causes an error Replace with showDiveList() Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28mobile-widget/qml: avoid binding loop in GlobalDrawerGravatar jan Iversen
rightPadding seems defined in Kirigami and the default value causes a binding loop. set rightPadding directly. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-27Cosmetic updates to .UI files for PreferencesGravatar willemferguson
This is a cosmetic update to remove some warning messages while building a fresh subsurface. These warnings were due to duplicate label names in the .UI files. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-12-27tests: add test cases plannerShared ratingsGravatar jan Iversen
Add test cases to test ratings variables Signed-off-by: Jan Iversen <jan@casacondor.com>