diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index 0267ead66..3fe5d237c 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -386,8 +386,6 @@ namespace BlackCore Q_ASSERT(c); c = connect(simulator, &ISimulator::physicallyAddingRemoteModelFailed, this, &CContextSimulator::addingRemoteAircraftFailed); Q_ASSERT(c); - c = connect(simulator, &ISimulator::receivedRequestedElevation, this, &CContextSimulator::onReceivedRequestedElevation); - Q_ASSERT(c); c = connect(simulator, &ISimulator::ownAircraftModelChanged, this, &IContextSimulator::ownAircraftModelChanged); Q_ASSERT(c); c = connect(simulator, &ISimulator::aircraftRenderingChanged, this, &IContextSimulator::aircraftRenderingChanged); @@ -423,8 +421,10 @@ namespace BlackCore m_simulatorPlugin.second = simulator; // Emit signal after this function completes + QPointer myself(this); QTimer::singleShot(0, this, [ = ] { + if (!myself) { return; } emit this->simulatorPluginChanged(simulatorPluginInfo); }); @@ -601,12 +601,6 @@ namespace BlackCore emit getIContextOwnAircraft()->changedAircraftCockpit(ownAircraft, IContextSimulator::InterfaceName()); } - void CContextSimulator::onReceivedRequestedElevation(const CElevationPlane &plane, const CCallsign &callsign) - { - if (!this->isSimulatorAvailable()) { return; } - emit this->receivedRequestedElevation(plane, callsign); - } - void CContextSimulator::xCtxChangedRemoteAircraftModel(const CSimulatedAircraft &aircraft, const BlackMisc::CIdentifier &originator) { if (CIdentifiable::isMyIdentifier(originator)) { return; } diff --git a/src/blackcore/context/contextsimulatorimpl.h b/src/blackcore/context/contextsimulatorimpl.h index 37d711846..e01b997c6 100644 --- a/src/blackcore/context/contextsimulatorimpl.h +++ b/src/blackcore/context/contextsimulatorimpl.h @@ -147,11 +147,6 @@ namespace BlackCore BlackMisc::CSimpleCommandParser::registerCommand({".ris parts on|off", "aircraft parts (global setup)"}); } - signals: - //! A requested elevation has been received - //! \remark only meant to be used locally, not via DBus - void receivedRequestedElevation(const BlackMisc::Geo::CElevationPlane &plane, const BlackMisc::Aviation::CCallsign &callsign); - protected: //! Constructor CContextSimulator(CCoreFacadeConfig::ContextMode, CCoreFacade *runtime); @@ -204,9 +199,6 @@ namespace BlackCore //! Simulator has changed cockpit void onCockpitChangedFromSimulator(const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft); - //! Received elevation - void onReceivedRequestedElevation(const BlackMisc::Geo::CElevationPlane &plane, const BlackMisc::Aviation::CCallsign &callsign); - //! Failed adding remote aircraft void addingRemoteAircraftFailed(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft, const BlackMisc::CStatusMessage &message); diff --git a/src/blackmisc/genericdbusinterface.h b/src/blackmisc/genericdbusinterface.h index 4aac85615..27e6e8889 100644 --- a/src/blackmisc/genericdbusinterface.h +++ b/src/blackmisc/genericdbusinterface.h @@ -43,8 +43,10 @@ namespace BlackMisc //! For each signal in parent, attempt to connect to it an interface signal of the same name. //! \see BLACK_NO_RELAY + //! \deprecated KB 2018-08 this seems to be not used anymore and might be removed void relayParentSignals() { + Q_ASSERT_X(false, Q_FUNC_INFO, "crosscheck if still used"); const QMetaObject *metaObject = this->parent()->metaObject(); const QMetaObject *superMetaObject = metaObject; while (strcmp(superMetaObject->superClass()->className(), "QObject") != 0) { superMetaObject = superMetaObject->superClass(); }