From db51d5e4c54534dad81b0dacae3aeb75982106d6 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 20 Mar 2022 18:01:46 +0000 Subject: [PATCH] Removed unused EventManager class member from Insight and InsightWorker --- src/Application.cpp | 1 - src/Insight/Insight.cpp | 2 -- src/Insight/Insight.hpp | 4 +--- src/Insight/InsightWorker/InsightWorker.cpp | 2 -- src/Insight/InsightWorker/InsightWorker.hpp | 3 +-- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 68b85fc9..907de8be 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -44,7 +44,6 @@ namespace Bloom if (this->insightConfig->insightEnabled) { this->insight = std::make_unique( *(this->applicationEventListener), - this->eventManager, this->projectConfig.value(), this->environmentConfig.value(), this->insightConfig.value(), diff --git a/src/Insight/Insight.cpp b/src/Insight/Insight.cpp index e5e1ed18..e6aa3d19 100644 --- a/src/Insight/Insight.cpp +++ b/src/Insight/Insight.cpp @@ -16,14 +16,12 @@ namespace Bloom Insight::Insight( EventListener& eventListener, - EventManager& eventManager, const ProjectConfig& projectConfig, const EnvironmentConfig& environmentConfig, const InsightConfig& insightConfig, InsightProjectSettings& insightProjectSettings ) : eventListener(eventListener) - , eventManager(eventManager) , projectConfig(projectConfig) , environmentConfig(environmentConfig) , insightConfig(insightConfig) diff --git a/src/Insight/Insight.hpp b/src/Insight/Insight.hpp index a0fad3c2..a7e18b22 100644 --- a/src/Insight/Insight.hpp +++ b/src/Insight/Insight.hpp @@ -40,7 +40,6 @@ namespace Bloom */ explicit Insight( EventListener& eventListener, - EventManager& eventManager, const ProjectConfig& projectConfig, const EnvironmentConfig& environmentConfig, const InsightConfig& insightConfig, @@ -68,11 +67,10 @@ namespace Bloom InsightProjectSettings& insightProjectSettings; - EventManager& eventManager; EventListener& eventListener; QApplication application; - InsightWorker* insightWorker = new InsightWorker(this->eventManager); + InsightWorker* insightWorker = new InsightWorker(); InsightWindow* mainWindow = new InsightWindow( *(this->insightWorker), this->environmentConfig, diff --git a/src/Insight/InsightWorker/InsightWorker.cpp b/src/Insight/InsightWorker/InsightWorker.cpp index 06b49304..55e2dbd7 100644 --- a/src/Insight/InsightWorker/InsightWorker.cpp +++ b/src/Insight/InsightWorker/InsightWorker.cpp @@ -12,8 +12,6 @@ namespace Bloom using Bloom::Targets::TargetState; - InsightWorker::InsightWorker(EventManager& eventManager): eventManager(eventManager) {} - void InsightWorker::queueTask(InsightWorkerTask* task) { auto taskQueueLock = this->queuedTasks.acquireLock(); task->moveToThread(this->thread()); diff --git a/src/Insight/InsightWorker/InsightWorker.hpp b/src/Insight/InsightWorker/InsightWorker.hpp index cbebe857..a5bbd87d 100644 --- a/src/Insight/InsightWorker/InsightWorker.hpp +++ b/src/Insight/InsightWorker/InsightWorker.hpp @@ -23,7 +23,7 @@ namespace Bloom Q_OBJECT public: - explicit InsightWorker(EventManager& eventManager); + InsightWorker() = default; void queueTask(InsightWorkerTask* task); @@ -45,7 +45,6 @@ namespace Bloom void targetRegistersWritten(const Bloom::Targets::TargetRegisters& targetRegisters, const QDateTime& timestamp); private: - EventManager& eventManager; EventListenerPointer eventListener = std::make_shared("InsightWorkerEventListener"); TargetControllerConsole targetControllerConsole = TargetControllerConsole(*(this->eventListener));