mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
startup mobile: make diveplanner part of Qt type system
Register DivePlanner before starting QML. Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
3930cc42a5
commit
0c23e005ea
1 changed files with 8 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue