aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlprefs.cpp
AgeCommit message (Collapse)Author
2019-12-24mobile UI/login: remove cloudPassword from QMLPrefsGravatar jan Iversen
cloudPassword is no longer used as a temporary variable Remove cloudPassword from QMLPrefs. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24mobile UI/login: remove cloudUserName from QMLPrefsGravatar jan Iversen
cloudUserName is no longer used as a temporary variable. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24mobile UI/login: do not revert to old credentials.Gravatar jan Iversen
If the user asked to change credentials it is equivalent to a signout, so no need to store old credentials. This simplification allows removal of the temporary credentials in qmlPrefs. this commits secures the user is locked in the login page, until one of 3 things happen: - enter verified credentials (divelist is loaded from cloud) - select no-cloud mode (divelist is loaded from local) - enter new credentials, PIN page shows, enter PIN or cancel (back to enter credentials). This is consistent even if the program is restarted. Old version had a non consistent way: A user enters new credentials, sees the PIN screen, but does not receive the email immediately, so works with other applications (causing the mobile app to close) Having received the email with the PiN, the user starts mobile again, BUT does not see the PIN screen, instead the old credentials are used. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-27Revert the singleton PRGravatar Dirk Hohndel
It turns out that this isn't working the way it was intended to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-25Cleanup: unify idiosyncratic singletonsGravatar Berthold Stoeger
The way we handle singletons in QML, QML insists on allocating the objects. This leads to a very idiosyncratic way of handling singletons: The global instance pointer is set in the constructor. Unify all these by implementing a "SillySingleton" template. All of the weird singleton-classes can derive from this template and don't have to bother with reimplementing the instance() function with all the safety-checks, etc. This serves firstly as documentation but also improves debugging as we will now see wanted and unwanted creation and destruction of these weird singletons. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-19Mobile: set units system in "No cloud mode"Gravatar Jocke
When starting the app in "No cloud mode" we need to make sure that the units and unit_system match. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-12mobile-widgets: replace qmlprefs::theme with qPrefDisplay::themeGravatar jan Iversen
Shortcut and use qPrefDisplay::theme() direct Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12mobile-widgets: remove setTimeThreshold from systemGravatar jan Iversen
Use qPrefLocationService::set_time_threshold and remove from qmlprefs.cpp and qmlmanager.cpp Remark: mobile UI shows time in minutes, while it is stored (and calculated) in seconds. Therefore a /60 when reading and *60 when setting. Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12mobile-widgets: move distanceThreshold handling to qPrefGravatar jan Iversen
Remove distanceThreshold from qmlprefs and use qPref instead update qml no user experience change Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-12mobile-widgets: make show_developer persistentGravatar jan Iversen
Remove developer from qmlprefs and use qPref instead Update qml show_developer is saved on disk, and thus remembered between starts. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-11core/settings ... : remove qPref* includes in qPref.hGravatar jan Iversen
reduce number of includes by removing qPref* includes in qPref.h Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core: declare cloud_status in qPrefCloudStorageGravatar jan Iversen
qml declaration of cloud_status (defined in pref.h) does not belong in qPref.h but in qPrefCloudStorage Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25mobile-widgets: remove QSettingsGravatar jan Iversen
update qmlprefs and qmlmanager to use qPref Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15mobile-widgets: remove SettingsObjectWrapper and update qPref callsGravatar jan Iversen
remove use of SettingsObjectWrapper:: remove include of SettingsObjectWrapper.h use qPrefFoo:: for setters and getters replace prefs.foo with qPrefXYZ::foo() where feasible (this expands to the same code, but gives us more control over the variable). Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-10core: make qPref::cloud_status the only version of the enumGravatar jan Iversen
add enum to qPref and remove elsewhere update source core to reference qPref. the enum cannot be in pref.h because it is to be used in qml and Q_ENUM need the enum to be defined as part of the class Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-05mobile-widgets: solve cloudstatus register problemGravatar jan Iversen
Use Q_ENUM instad of Q_ENUMS (which is depreciated) since it does the meta registration for all Qt platforms. Q_ENUM require the enum to be defined in the class and cannot refer to a global class, therefore copied enum to class. This commit is made to get the release to work, with minimal changes, this class will be moved to qPref and the double definition solved Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04core: remove double definition of enum cloud_storage_statusGravatar jan Iversen
Remove cloud_storage_status from qmlprefs.h. usage to qPref:: enum cloud_storage_status is not used from C, but only from C++, and having the same structure defined multiple times is a maintenance challenge. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15mobile: move settings from qmlmanager to qmlprefsGravatar jan Iversen
add settings variables/functions to qmlprefs remove settings variables/functions from qmlmanager change manager. to prefs. in qml files for setting variables/functions Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15mobile: add qmlprefs classGravatar jan Iversen
add class to cmake and pro register class Signed-off-by: Jan Iversen <jani@apache.org>