diff --git a/src/singletons/Theme.cpp b/src/singletons/Theme.cpp index 6e7d26f21..ba7cbf63e 100644 --- a/src/singletons/Theme.cpp +++ b/src/singletons/Theme.cpp @@ -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> 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)) { diff --git a/src/singletons/Theme.hpp b/src/singletons/Theme.hpp index 46ecea571..034a01b64 100644 --- a/src/singletons/Theme.hpp +++ b/src/singletons/Theme.hpp @@ -169,7 +169,7 @@ private: * * NOTE: This is currently not built to be reloadable **/ - void loadAvailableThemes(); + void loadAvailableThemes(const Paths &paths); std::optional findThemeByKey(const QString &key);