mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
mobile: register QML interface
call setup with registration of QML interface class Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fdc2fd35bf
commit
9105a4c39b
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
#include <QQmlContext>
|
#include <QQmlContext>
|
||||||
#include "mobile-widgets/qmlmanager.h"
|
#include "mobile-widgets/qmlmanager.h"
|
||||||
|
#include "mobile-widgets/qmlinterface.h"
|
||||||
#include "qt-models/divelistmodel.h"
|
#include "qt-models/divelistmodel.h"
|
||||||
#include "qt-models/gpslistmodel.h"
|
#include "qt-models/gpslistmodel.h"
|
||||||
#include "qt-models/messagehandlermodel.h"
|
#include "qt-models/messagehandlermodel.h"
|
||||||
|
@ -188,6 +189,9 @@ void register_qml_types(QQmlEngine *engine)
|
||||||
QQmlContext *ct = engine->rootContext();
|
QQmlContext *ct = engine->rootContext();
|
||||||
|
|
||||||
ct->setContextProperty("Planner", plannerShared::instance());
|
ct->setContextProperty("Planner", plannerShared::instance());
|
||||||
|
|
||||||
|
// Register qml interface class
|
||||||
|
QMLInterface::setup(ct);
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_TYPE(QMLManager, "QMLManager");
|
REGISTER_TYPE(QMLManager, "QMLManager");
|
||||||
|
|
Loading…
Reference in a new issue