mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
DBus test (GUI + core) fixes
* removed unused signals * marked relayParentSignals as deprecated, currently not used
This commit is contained in:
@@ -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<CContextSimulator> 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; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user