summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/themeinterface.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2020-01-28 15:04:22 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-28 11:05:45 -0800
commit1d35942249a41a703db6e21323ddd21719303f3f (patch)
tree1046a89dceea59a658a2862b7f3323f2c5fc05c6 /mobile-widgets/themeinterface.cpp
parentf69e1e31f00835e0be52bdb37fa5cfa327303faa (diff)
downloadsubsurface-1d35942249a41a703db6e21323ddd21719303f3f.tar.gz
themeinterface: move registration to themeinterface
Move setup call and registration from subsurface-helper to themeInterface, in order to keep the registration where the code are. Signed-off-by: jan Iversen <jan@casacondor.com>
Diffstat (limited to 'mobile-widgets/themeinterface.cpp')
-rw-r--r--mobile-widgets/themeinterface.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/mobile-widgets/themeinterface.cpp b/mobile-widgets/themeinterface.cpp
index 9f2e842ee..2d87a9d29 100644
--- a/mobile-widgets/themeinterface.cpp
+++ b/mobile-widgets/themeinterface.cpp
@@ -8,11 +8,14 @@ themeInterface *themeInterface::instance()
return self;
}
-void themeInterface::setup()
+void themeInterface::setup(QQmlContext *ct)
{
+ // Register interface class
+ ct->setContextProperty("ThemeNew", instance());
+
// get current theme
- m_currentTheme = qPrefDisplay::theme();
- update_theme();
+ instance()->m_currentTheme = qPrefDisplay::theme();
+ instance()->update_theme();
}
void themeInterface::set_currentTheme(const QString &theme)