diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index 4fa3c238e..26345d2f6 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -303,14 +303,14 @@ namespace BlackCore return m_simulatorPlugin.second->getTimeSynchronizationOffset(); } - bool CContextSimulator::loadSimulatorPlugin(const CSimulatorPluginInfo &simulatorInfo, bool withListener) + bool CContextSimulator::loadSimulatorPlugin(const CSimulatorPluginInfo &simulatorPluginInfo, bool withListener) { Q_ASSERT(getIContextApplication()); Q_ASSERT(getIContextApplication()->isUsingImplementingObject()); - Q_ASSERT(!simulatorInfo.isUnspecified()); + Q_ASSERT(!simulatorPluginInfo.isUnspecified()); Q_ASSERT(CThreadUtils::isCurrentThreadApplicationThread()); // only run in main thread - if (!simulatorInfo.isValid()) + if (!simulatorPluginInfo.isValid()) { CLogMessage(this).error("Illegal plugin"); return false; @@ -327,17 +327,17 @@ namespace BlackCore // now we have a state where no driver is loaded if (withListener) { - this->listenForSimulator(simulatorInfo); + this->listenForSimulator(simulatorPluginInfo); return false; // not a plugin yet, just listener } - if (!simulatorInfo.isValid() || simulatorInfo.isUnspecified()) + if (!simulatorPluginInfo.isValid() || simulatorPluginInfo.isUnspecified()) { CLogMessage(this).error("Illegal plugin"); return false; } - ISimulatorFactory *factory = m_plugins->getFactory(simulatorInfo.getIdentifier()); + ISimulatorFactory *factory = m_plugins->getFactory(simulatorPluginInfo.getIdentifier()); Q_ASSERT_X(factory, Q_FUNC_INFO, "no factory"); // We assume we run in the same process as the own aircraft context @@ -346,7 +346,7 @@ namespace BlackCore Q_ASSERT(this->getIContextNetwork()->isUsingImplementingObject()); IOwnAircraftProvider *ownAircraftProvider = this->getRuntime()->getCContextOwnAircraft(); IRemoteAircraftProvider *renderedAircraftProvider = this->getRuntime()->getCContextNetwork(); - ISimulator *simulator = factory->create(simulatorInfo, ownAircraftProvider, renderedAircraftProvider, &m_weatherManager); + ISimulator *simulator = factory->create(simulatorPluginInfo, ownAircraftProvider, renderedAircraftProvider, &m_weatherManager); Q_ASSERT_X(simulator, Q_FUNC_INFO, "no simulator driver can be created"); bool c = connect(simulator, &ISimulator::simulatorStatusChanged, this, &CContextSimulator::ps_onSimulatorStatusChanged); @@ -374,11 +374,11 @@ namespace BlackCore // try to connect to simulator simulator->connectTo(); // when everything is set up connected, update the current plugin info - m_simulatorPlugin.first = simulatorInfo; + m_simulatorPlugin.first = simulatorPluginInfo; m_simulatorPlugin.second = simulator; - emit simulatorPluginChanged(simulatorInfo); - CLogMessage(this).info("Simulator plugin loaded: %1") << simulatorInfo.toQString(true); + emit simulatorPluginChanged(simulatorPluginInfo); + CLogMessage(this).info("Simulator plugin loaded: %1") << simulatorPluginInfo.toQString(true); return true; } diff --git a/src/blackcore/context/contextsimulatorimpl.h b/src/blackcore/context/contextsimulatorimpl.h index ce46b91c1..52e756d55 100644 --- a/src/blackcore/context/contextsimulatorimpl.h +++ b/src/blackcore/context/contextsimulatorimpl.h @@ -187,7 +187,7 @@ namespace BlackCore private: //! Load plugin, if required start listeners before - bool loadSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo, bool withListeners); + bool loadSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorPluginInfo, bool withListeners); //! Unload plugin, if desired restart listeners void unloadSimulatorPlugin();