diff options
author | DaMichel <mw.pub@welter-4d.de> | 2016-07-29 16:32:54 +0200 |
---|---|---|
committer | DaMichel <mw.pub@welter-4d.de> | 2016-07-29 16:32:54 +0200 |
commit | 12d2080865958cc07d37dddd28240f40423fb292 (patch) | |
tree | 240a7e71221279206ae1618e86cb66770913547a /opentrack-logic/work.hpp | |
parent | 884b3f013045d60d586c55338a76feb4dfa30c9b (diff) |
logger: it is definitely nicer to not have things all over the place
Diffstat (limited to 'opentrack-logic/work.hpp')
-rw-r--r-- | opentrack-logic/work.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/opentrack-logic/work.hpp b/opentrack-logic/work.hpp index 6425b11c..4afb1da4 100644 --- a/opentrack-logic/work.hpp +++ b/opentrack-logic/work.hpp @@ -13,6 +13,7 @@ #include "tracker.h" #include "shortcuts.h" #include "export.hpp" +#include "tracklogger.hpp" #include <QObject> #include <QFrame> @@ -25,15 +26,18 @@ struct OPENTRACK_LOGIC_EXPORT Work { using fn_t = std::function<void(bool)>; using key_tuple = std::tuple<key_opts&, fn_t, bool>; - + main_settings s; // tracker needs settings, so settings must come before it SelectedLibraries& libs; + std::shared_ptr<TrackLogger> logger; // must come before tracker, since tracker depends on it std::shared_ptr<Tracker> tracker; std::shared_ptr<Shortcuts> sc; WId handle; std::vector<key_tuple> keys; - main_settings s; - Work(Mappings& m, SelectedLibraries& libs, TrackLogger &logger, WId handle); + Work(Mappings& m, SelectedLibraries& libs, WId handle); ~Work(); void reload_shortcuts(); + +private: + std::shared_ptr<TrackLogger> make_logger(const main_settings &s); }; |