cleanup: move initialization of ThemeInterface
The ThemeInterface was initialized and connected to QML in the register_qml_types() function. However, it is not a type. Move the initialization to a place where we create the other global QML objects. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9d485f9626
commit
2db6b16a70
@ -110,6 +110,7 @@ void run_ui()
|
||||
|
||||
ctxt->setContextProperty("connectionListModel", &connectionListModel);
|
||||
ctxt->setContextProperty("logModel", MessageHandlerModel::self());
|
||||
ctxt->setContextProperty("subsurfaceTheme", ThemeInterface::instance());
|
||||
|
||||
qmlRegisterUncreatableType<QMLManager>("org.subsurfacedivelog.mobile",1,0,"ExportType","Enum is not a type");
|
||||
|
||||
@ -199,7 +200,6 @@ void register_qml_types(QQmlEngine *engine)
|
||||
|
||||
// Register qml interface classes
|
||||
QMLInterface::setup(ct);
|
||||
ct->setContextProperty("subsurfaceTheme", ThemeInterface::instance());
|
||||
}
|
||||
|
||||
REGISTER_TYPE(QMLManager, "QMLManager");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user