aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlinterface.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-18 14:02:00 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-18 17:35:04 -0800
commitc93b76eee663d5b000dcd9f0a3e7b4fa12b99b9b (patch)
treed0e95b7489d98227552313a00e9d641d49c1c67d /mobile-widgets/qmlinterface.cpp
parent9105a4c39b26d64a3fb316e2c38f119857dae813 (diff)
downloadsubsurface-c93b76eee663d5b000dcd9f0a3e7b4fa12b99b9b.tar.gz
mobile-widgets: make cloud_verification_status type proof in QML.
Add CLOUD_STATUS enum to interface. Add cloud_verifification_status variable to interface, and make it strongly typed in QML. using backend.cloud_verification_status = 1 will fail but backend.cloud_verification_status = backend.CS_UNKNOWN is correct. Added note to the original definitions of the enums that they have been duplicated. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlinterface.cpp')
-rw-r--r--mobile-widgets/qmlinterface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/mobile-widgets/qmlinterface.cpp b/mobile-widgets/qmlinterface.cpp
index 78aba6a5c..2f470bba4 100644
--- a/mobile-widgets/qmlinterface.cpp
+++ b/mobile-widgets/qmlinterface.cpp
@@ -18,4 +18,6 @@ void QMLInterface::setup(QQmlContext *ct)
qmlRegisterUncreatableType<QMLInterface>("org.subsurfacedivelog.mobile",1,0,"Enums","Enum is not a type");
// relink signals to QML
+ connect(qPrefCloudStorage::instance(), &qPrefCloudStorage::cloud_verification_statusChanged,
+ [=] (int value) { emit instance()->cloud_verification_statusChanged(CLOUD_STATUS(value)); });
}