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>
This commit is contained in:
Berthold Stoeger 2020-03-30 21:33:05 +02:00 committed by Dirk Hohndel
parent 0e9bd27bae
commit 9d485f9626
3 changed files with 3 additions and 7 deletions

View file

@ -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");