diff options
author | jan Iversen <jani@apache.org> | 2018-07-05 20:37:53 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-10 10:30:50 -0700 |
commit | 8d66633fe798f6c45978ea1b0d47aa04625d4ac5 (patch) | |
tree | 1a6b63b6720f52f3263fa371e6c9f95ccfacf3e7 /mobile-widgets/qml/main.qml | |
parent | 7103f36c7c9ed0117a9f600cee6b2565d98a6638 (diff) | |
download | subsurface-8d66633fe798f6c45978ea1b0d47aa04625d4ac5.tar.gz |
core: make qPref::cloud_status the only version of the enum
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>
Diffstat (limited to 'mobile-widgets/qml/main.qml')
-rw-r--r-- | mobile-widgets/qml/main.qml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 1ccab80e5..03d7238c3 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -186,10 +186,10 @@ Kirigami.ApplicationWindow { text: qsTr("Dive list") onTriggered: { manager.appendTextToLog("requested dive list with credential status " + prefs.credentialStatus) - if (prefs.credentialStatus == QMLPrefs.CS_UNKNOWN) { + if (prefs.credentialStatus == SsrfPrefs.CS_UNKNOWN) { // the user has asked to change credentials - if the credentials before that // were valid, go back to dive list - if (oldStatus == QMLPrefs.CS_VERIFIED) { + if (oldStatus == SsrfPrefs.CS_VERIFIED) { prefs.credentialStatus = oldStatus } } @@ -216,8 +216,8 @@ Kirigami.ApplicationWindow { name: ":/icons/ic_add.svg" } text: qsTr("Add dive manually") - enabled: prefs.credentialStatus === QMLPrefs.CS_VERIFIED || - prefs.credentialStatus === QMLPrefs.CS_NOCLOUD + enabled: prefs.credentialStatus === SsrfPrefs.CS_VERIFIED || + prefs.credentialStatus === SsrfPrefs.CS_NOCLOUD onTriggered: { globalDrawer.close() returnTopPage() // otherwise odd things happen with the page stack @@ -251,14 +251,14 @@ Kirigami.ApplicationWindow { name: ":/icons/cloud_sync.svg" } text: qsTr("Manual sync with cloud") - enabled: prefs.credentialStatus === QMLPrefs.CS_VERIFIED || - prefs.credentialStatus === QMLPrefs.CS_NOCLOUD + enabled: prefs.credentialStatus === SsrfPrefs.CS_VERIFIED || + prefs.credentialStatus === SsrfPrefs.CS_NOCLOUD onTriggered: { - if (prefs.credentialStatus === QMLPrefs.CS_NOCLOUD) { + if (prefs.credentialStatus === SsrfPrefs.CS_NOCLOUD) { returnTopPage() oldStatus = prefs.credentialStatus manager.startPageText = "Enter valid cloud storage credentials" - prefs.credentialStatus = QMLPrefs.CS_UNKNOWN + prefs.credentialStatus = SsrfPrefs.CS_UNKNOWN globalDrawer.close() } else { globalDrawer.close() @@ -273,7 +273,7 @@ Kirigami.ApplicationWindow { name: syncToCloud ? ":/icons/ic_cloud_off.svg" : ":/icons/ic_cloud_done.svg" } text: syncToCloud ? qsTr("Disable auto cloud sync") : qsTr("Enable auto cloud sync") - enabled: prefs.credentialStatus !== QMLPrefs.CS_NOCLOUD + enabled: prefs.credentialStatus !== SsrfPrefs.CS_NOCLOUD onTriggered: { syncToCloud = !syncToCloud if (!syncToCloud) { |