chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user