aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-13 14:45:32 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-26 16:42:35 -0800
commit3c93ee862b712e1238a9ceacff2c7178fd9c16d1 (patch)
tree574189412a615c682ab8f01ba204083e8cf3f786
parent9de296f3dd6fc93ad4cfa68528cfa733e585e352 (diff)
downloadsubsurface-3c93ee862b712e1238a9ceacff2c7178fd9c16d1.tar.gz
mobile: register themeInterface
Register themeInterface with a temporary name, which allows it to be integrated in subsurfaceTheme (main.qml). Once all of subsurfaceTheme (main.qml) is available in themeInterface, the name will be changed. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-helper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp
index 0ecc998ea..5d1a84fae 100644
--- a/subsurface-helper.cpp
+++ b/subsurface-helper.cpp
@@ -13,6 +13,7 @@
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
+#include "mobile-widgets/themeinterface.h"
#include "mobile-widgets/qmlmanager.h"
#include "mobile-widgets/qmlinterface.h"
#include "qt-models/divelistmodel.h"
@@ -188,6 +189,9 @@ void register_qml_types(QQmlEngine *engine)
// Register qml interface class
QMLInterface::setup(ct);
+
+ themeInterface::instance()->setup();
+ ct->setContextProperty("ThemeNew", themeInterface::instance());
}
REGISTER_TYPE(QMLManager, "QMLManager");