chore: remove Singleton & replace getIApp with getApp (#5514)

This commit is contained in:
pajlada
2024-07-21 15:09:59 +02:00
committed by GitHub
parent 21186df058
commit 5deec1f02f
145 changed files with 802 additions and 856 deletions
+5 -6
View File
@@ -5,7 +5,7 @@
#include "controllers/commands/Command.hpp"
#include "controllers/commands/CommandController.hpp"
#include "controllers/hotkeys/HotkeyController.hpp"
#include "mocks/EmptyApplication.hpp"
#include "mocks/BaseApplication.hpp"
#include "singletons/Emotes.hpp"
#include "singletons/Fonts.hpp"
#include "singletons/Paths.hpp"
@@ -24,13 +24,14 @@ using ::testing::Exactly;
namespace {
class MockApplication : mock::EmptyApplication
class MockApplication : public mock::BaseApplication
{
public:
MockApplication()
: settings(this->settingsDir.filePath("settings.json"))
: theme(this->paths_)
, fonts(this->settings)
, windowManager(this->paths)
, windowManager(this->paths_)
, commands(this->paths_)
{
}
Theme *getThemes() override
@@ -68,11 +69,9 @@ public:
return &this->emotes;
}
Settings settings;
Theme theme;
HotkeyController hotkeys;
Fonts fonts;
Paths paths;
WindowManager windowManager;
AccountController accounts;
CommandController commands;