mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Don't use getIApp()->getPaths() in Theme
This commit is contained in:
parent
78c028d4e0
commit
d46b553c53
|
@ -228,7 +228,7 @@ void Theme::initialize(Settings &settings, const Paths &paths)
|
|||
},
|
||||
false);
|
||||
|
||||
this->loadAvailableThemes();
|
||||
this->loadAvailableThemes(paths);
|
||||
|
||||
this->update();
|
||||
}
|
||||
|
@ -328,11 +328,11 @@ std::vector<std::pair<QString, QVariant>> Theme::availableThemes() const
|
|||
return packagedThemes;
|
||||
}
|
||||
|
||||
void Theme::loadAvailableThemes()
|
||||
void Theme::loadAvailableThemes(const Paths &paths)
|
||||
{
|
||||
this->availableThemes_ = Theme::builtInThemes;
|
||||
|
||||
auto dir = QDir(getIApp()->getPaths().themesDirectory);
|
||||
auto dir = QDir(paths.themesDirectory);
|
||||
for (const auto &info :
|
||||
dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name))
|
||||
{
|
||||
|
|
|
@ -169,7 +169,7 @@ private:
|
|||
*
|
||||
* NOTE: This is currently not built to be reloadable
|
||||
**/
|
||||
void loadAvailableThemes();
|
||||
void loadAvailableThemes(const Paths &paths);
|
||||
|
||||
std::optional<ThemeDescriptor> findThemeByKey(const QString &key);
|
||||
|
||||
|
|
Loading…
Reference in a new issue