diff --git a/mocks/include/mocks/EmptyApplication.hpp b/mocks/include/mocks/EmptyApplication.hpp index 84cadffc0..f104d2edb 100644 --- a/mocks/include/mocks/EmptyApplication.hpp +++ b/mocks/include/mocks/EmptyApplication.hpp @@ -10,6 +10,11 @@ class EmptyApplication : public IApplication public: virtual ~EmptyApplication() = default; + const Paths &getPaths() override + { + return this->paths_; + } + const Args &getArgs() override { return this->args_; @@ -169,6 +174,7 @@ public: } private: + Paths paths_; Args args_; }; diff --git a/src/Application.cpp b/src/Application.cpp index be052d4a9..a1ad26cb8 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -107,9 +107,10 @@ IApplication::IApplication() // It will create the instances of the major classes, and connect their signals // to each other -Application::Application(Settings &_settings, const Paths &_paths, +Application::Application(Settings &_settings, const Paths &paths, const Args &_args) - : args_(_args) + : paths_(paths) + , args_(_args) , themes(&this->emplace()) , fonts(&this->emplace()) , emotes(&this->emplace()) diff --git a/src/Application.hpp b/src/Application.hpp index 60af329f0..8b95023eb 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -55,6 +55,7 @@ public: static IApplication *instance; + virtual const Paths &getPaths() = 0; virtual const Args &getArgs() = 0; virtual Theme *getThemes() = 0; virtual Fonts *getFonts() = 0; @@ -82,6 +83,7 @@ public: class Application : public IApplication { + const Paths &paths_; const Args &args_; std::vector> singletons_; int argc_{}; @@ -90,7 +92,7 @@ class Application : public IApplication public: static Application *instance; - Application(Settings &_settings, const Paths &_paths, const Args &_args); + Application(Settings &_settings, const Paths &paths, const Args &_args); ~Application() override; Application(const Application &) = delete; @@ -143,6 +145,10 @@ public: PluginController *const plugins{}; #endif + const Paths &getPaths() override + { + return this->paths_; + } const Args &getArgs() override { return this->args_;