refactor: some more Application refactors (#5551)

This commit is contained in:
pajlada
2024-08-25 13:04:48 +02:00
committed by GitHub
parent f4d6845587
commit 3e510fd9e9
14 changed files with 199 additions and 169 deletions
+18
View File
@@ -4,7 +4,9 @@
#include "mocks/DisabledStreamerMode.hpp"
#include "mocks/EmptyApplication.hpp"
#include "providers/bttv/BttvLiveUpdates.hpp"
#include "singletons/Fonts.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Theme.hpp"
#include <QString>
@@ -18,12 +20,16 @@ class BaseApplication : public EmptyApplication
public:
BaseApplication()
: settings(this->args, this->settingsDir.path())
, theme(this->paths_)
, fonts(this->settings)
{
}
explicit BaseApplication(const QString &settingsData)
: EmptyApplication(settingsData)
, settings(this->args, this->settingsDir.path())
, theme(this->paths_)
, fonts(this->settings)
{
}
@@ -32,6 +38,16 @@ public:
return &this->streamerMode;
}
Theme *getThemes() override
{
return &this->theme;
}
Fonts *getFonts() override
{
return &this->fonts;
}
BttvLiveUpdates *getBttvLiveUpdates() override
{
return nullptr;
@@ -45,6 +61,8 @@ public:
Args args;
Settings settings;
DisabledStreamerMode streamerMode;
Theme theme;
Fonts fonts;
};
} // namespace chatterino::mock