aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveList.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-09-04 11:18:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 17:22:58 -0700
commitd0edc296360e7653a4c8b672cfb136581c4a10f0 (patch)
tree6d42fcee2174770cd1e0c8edd892540553ee40b6 /mobile-widgets/qml/DiveList.qml
parenta71afd31ee66edf45c8970dcbd6514d7c4b5e9f0 (diff)
downloadsubsurface-d0edc296360e7653a4c8b672cfb136581c4a10f0.tar.gz
core,tests: change qml register function
In order to address the C++ object directy in qml, a different registration is needed. qmlRegisterType, registers the C++ class, allowing qml code to inherit from it and make qml objects. This is needed for graphical elemnets like profile and map setContentProperty, registers the C++ object, thus allowing signals to be catched. Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r--mobile-widgets/qml/DiveList.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 86d4a9c1a..7ca5ec493 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -23,7 +23,7 @@ Kirigami.ScrollablePage {
supportsRefreshing: true
onRefreshingChanged: {
if (refreshing) {
- if (prefs.credentialStatus === SsrfPrefs.CS_VERIFIED) {
+ if (prefs.credentialStatus === CloudStatus.CS_VERIFIED) {
console.log("User pulled down dive list - syncing with cloud storage")
detailsWindow.endEditMode()
manager.saveChangesCloud(true)
@@ -339,8 +339,8 @@ Kirigami.ScrollablePage {
StartPage {
id: startPage
anchors.fill: parent
- opacity: credentialStatus === SsrfPrefs.CS_NOCLOUD ||
- (credentialStatus === SsrfPrefs.CS_VERIFIED) ? 0 : 1
+ opacity: credentialStatus === CloudStatus.CS_NOCLOUD ||
+ (credentialStatus === CloudStatus.CS_VERIFIED) ? 0 : 1
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
function setupActions() {
@@ -348,8 +348,8 @@ Kirigami.ScrollablePage {
page.actions.main = null
page.actions.right = null
page.title = qsTr("Cloud credentials")
- } else if (prefs.credentialStatus === SsrfPrefs.CS_VERIFIED ||
- prefs.credentialStatus === SsrfPrefs.CS_NOCLOUD) {
+ } else if (prefs.credentialStatus === CloudStatus.CS_VERIFIED ||
+ prefs.credentialStatus === CloudStatus.CS_NOCLOUD) {
page.actions.main = page.downloadFromDCAction
page.actions.right = page.addDiveAction
page.title = qsTr("Dive list")
@@ -440,7 +440,7 @@ Kirigami.ScrollablePage {
onBackRequested: {
if (startPage.visible && diveListView.count > 0 &&
- prefs.credentialStatus !== SsrfPrefs.CS_INCORRECT_USER_PASSWD) {
+ prefs.credentialStatus !== CloudStatus.CS_INCORRECT_USER_PASSWD) {
prefs.credentialStatus = oldStatus
event.accepted = true;
}