aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-helper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-30 21:33:05 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-30 13:54:12 -0700
commit9d485f9626135f1297b01b095320b8c134f3a7e9 (patch)
tree7c0e075630d0952c1abbf36d1392de1448269155 /subsurface-helper.cpp
parent0e9bd27bae00641ce7f2df9dd4d080414b33e3fd (diff)
downloadsubsurface-9d485f9626135f1297b01b095320b8c134f3a7e9.tar.gz
cleanup: fold ThemeInterface::setup() into constructor
There appears to be no reason for two-phase initialization. Let's keep things simple: let the constructor produce a functioning object. 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 eb3bcc27a..65a6e9630 100644
--- a/subsurface-helper.cpp
+++ b/subsurface-helper.cpp
@@ -199,7 +199,7 @@ void register_qml_types(QQmlEngine *engine)
// Register qml interface classes
QMLInterface::setup(ct);
- ThemeInterface::instance()->setup(ct);
+ ct->setContextProperty("subsurfaceTheme", ThemeInterface::instance());
}
REGISTER_TYPE(QMLManager, "QMLManager");