mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
0e9bd27bae
commit
9d485f9626
3 changed files with 3 additions and 7 deletions
|
@ -50,11 +50,8 @@ ThemeInterface *ThemeInterface::instance()
|
|||
return self;
|
||||
}
|
||||
|
||||
void ThemeInterface::setup(QQmlContext *ct)
|
||||
ThemeInterface::ThemeInterface()
|
||||
{
|
||||
// Register interface class
|
||||
ct->setContextProperty("subsurfaceTheme", this);
|
||||
|
||||
// get current theme
|
||||
m_currentTheme = qPrefDisplay::theme();
|
||||
update_theme();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue