make sure we connect themeChanged
This commit is contained in:
parent
0ca0934370
commit
2006df44cc
|
@ -111,6 +111,7 @@ Theme::Theme(const QString &themeName, QObject *parent)
|
||||||
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()),
|
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()),
|
||||||
this, SLOT(onAppExitCleanup()));
|
this, SLOT(onAppExitCleanup()));
|
||||||
}
|
}
|
||||||
|
connect(d, &ThemePrivate::themeChanged, this, &Theme::themeChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
Theme::~Theme()
|
Theme::~Theme()
|
||||||
|
@ -157,11 +158,12 @@ void Theme::setThemeName(const QString &themeName)
|
||||||
ThemePrivate::themesRefCount.remove(d->themeName);
|
ThemePrivate::themesRefCount.remove(d->themeName);
|
||||||
delete themePrivate;
|
delete themePrivate;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!ThemePrivate::themes.contains(themeName)) {
|
if (!ThemePrivate::themes.contains(themeName)) {
|
||||||
ThemePrivate::themes[themeName] = new ThemePrivate;
|
ThemePrivate::themes[themeName] = new ThemePrivate;
|
||||||
ThemePrivate::themesRefCount[themeName] = 0;
|
ThemePrivate::themesRefCount[themeName] = 0;
|
||||||
|
}
|
||||||
|
connect(d, &ThemePrivate::themeChanged, this, &Theme::themeChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
++ThemePrivate::themesRefCount[themeName];
|
++ThemePrivate::themesRefCount[themeName];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user