diff options
-rw-r--r-- | subsurface-helper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index d1c24c4cd..a19c52a2f 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -20,6 +20,7 @@ #include "qt-models/messagehandlermodel.h" #include "profile-widget/qmlprofile.h" #include "core/downloadfromdcthread.h" +#include "core/plannershared.h" #include "qt-models/diveimportedmodel.h" #include "mobile-widgets/qml/kirigami/src/kirigamiplugin.h" #else @@ -183,6 +184,13 @@ void register_qml_types(QQmlEngine *engine) int rc; #ifdef SUBSURFACE_MOBILE + // register shared diveplanner class + if (engine != NULL) { + QQmlContext *ct = engine->rootContext(); + + ct->setContextProperty("Planner", plannerShared::instance()); + } + REGISTER_TYPE(QMLManager, "QMLManager"); REGISTER_TYPE(QMLPrefs, "QMLPrefs"); REGISTER_TYPE(QMLProfile, "QMLProfile"); |