summaryrefslogtreecommitdiffstats
path: root/subsurface-helper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-30 21:36:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-30 13:54:12 -0700
commit2db6b16a708a7dedaca15566f6e898a3ee2035f1 (patch)
tree54bd4100d4e9713254cc221afc2f5ef73139eea4 /subsurface-helper.cpp
parent9d485f9626135f1297b01b095320b8c134f3a7e9 (diff)
downloadsubsurface-2db6b16a708a7dedaca15566f6e898a3ee2035f1.tar.gz
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>
Diffstat (limited to 'subsurface-helper.cpp')
-rw-r--r--subsurface-helper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp
index 65a6e9630..96e984520 100644
--- a/subsurface-helper.cpp
+++ b/subsurface-helper.cpp
@@ -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");