diff --git a/src/plugins/simulator/fs9/simulator_fs9.cpp b/src/plugins/simulator/fs9/simulator_fs9.cpp index 604addbbd..046e34716 100644 --- a/src/plugins/simulator/fs9/simulator_fs9.cpp +++ b/src/plugins/simulator/fs9/simulator_fs9.cpp @@ -50,8 +50,8 @@ namespace BlackSimPlugin // We move the host thread already in the constructor m_fs9Host->moveToThread(&m_hostThread); connect(&m_hostThread, &QThread::started, m_fs9Host, &CFs9Host::init); - connect(m_fs9Host, &CFs9Host::customPacketReceived, this, &CSimulatorFs9::processFs9Message); - connect(m_fs9Host, &CFs9Host::statusChanged, this, &CSimulatorFs9::changeHostStatus); + connect(m_fs9Host, &CFs9Host::customPacketReceived, this, &CSimulatorFs9::ps_processFs9Message); + connect(m_fs9Host, &CFs9Host::statusChanged, this, &CSimulatorFs9::ps_changeHostStatus); connect(&m_hostThread, &QThread::finished, m_fs9Host, &CFs9Host::deleteLater); connect(&m_hostThread, &QThread::finished, &m_hostThread, &QThread::deleteLater); m_hostThread.start(); @@ -108,7 +108,7 @@ namespace BlackSimPlugin client->moveToThread(clientThread); connect(clientThread, &QThread::started, client, &CFs9Client::init); - connect(client, &CFs9Client::clientTimedOut, this, &CSimulatorFs9::removeAircraft); + connect(client, &CFs9Client::clientTimedOut, this, &CSimulatorFs9::ps_removeAircraft); m_fs9ClientThreads.insert(client, clientThread); m_hashFs9Clients.insert(callsign, client); clientThread->start(); @@ -239,7 +239,7 @@ namespace BlackSimPlugin updateOwnAircraftFromSim(m_fsuipc->getOwnAircraft()); } - void CSimulatorFs9::processFs9Message(const QByteArray &message) + void CSimulatorFs9::ps_processFs9Message(const QByteArray &message) { CFs9Sdk::MULTIPLAYER_PACKET_ID messageType = MultiPlayerPacketParser::readType(message); @@ -249,7 +249,7 @@ namespace BlackSimPlugin { MPChangePlayerPlane mpChangePlayerPlane; MultiPlayerPacketParser::readMessage(message, mpChangePlayerPlane); - changeOwnAircraftModel(mpChangePlayerPlane.aircraft_name); + ps_changeOwnAircraftModel(mpChangePlayerPlane.aircraft_name); break; } case CFs9Sdk::MULTIPLAYER_PACKET_ID_POSITION_VELOCITY: @@ -271,13 +271,13 @@ namespace BlackSimPlugin } } - void CSimulatorFs9::changeOwnAircraftModel(const QString &modelname) + void CSimulatorFs9::ps_changeOwnAircraftModel(const QString &modelname) { m_aircraftModel.setQueriedModelString(modelname); emit aircraftModelChanged(m_aircraftModel); } - void CSimulatorFs9::changeHostStatus(CFs9Host::HostStatus status) + void CSimulatorFs9::ps_changeHostStatus(CFs9Host::HostStatus status) { switch (status) { @@ -301,7 +301,7 @@ namespace BlackSimPlugin } } - void CSimulatorFs9::removeAircraft(const QString &callsign) + void CSimulatorFs9::ps_removeAircraft(const QString &callsign) { removeRemoteAircraft(callsign); } diff --git a/src/plugins/simulator/fs9/simulator_fs9.h b/src/plugins/simulator/fs9/simulator_fs9.h index 076a61e8b..18fcb4021 100644 --- a/src/plugins/simulator/fs9/simulator_fs9.h +++ b/src/plugins/simulator/fs9/simulator_fs9.h @@ -122,16 +122,16 @@ namespace BlackSimPlugin void ps_dispatch(); //! Process incoming FS9 message - void processFs9Message(const QByteArray &message); + void ps_processFs9Message(const QByteArray &message); //! Change own aircraft model string - void changeOwnAircraftModel(const QString &modelname); + void ps_changeOwnAircraftModel(const QString &modelname); //! Change DirectPlay host status - void changeHostStatus(CFs9Host::HostStatus status); + void ps_changeHostStatus(CFs9Host::HostStatus status); //! Remove client by callsign QString - void removeAircraft(const QString &callsign); + void ps_removeAircraft(const QString &callsign); private: diff --git a/src/plugins/simulator/xplane/simulator_xplane.cpp b/src/plugins/simulator/xplane/simulator_xplane.cpp index c98320748..207a586ad 100644 --- a/src/plugins/simulator/xplane/simulator_xplane.cpp +++ b/src/plugins/simulator/xplane/simulator_xplane.cpp @@ -22,20 +22,20 @@ namespace BlackSimPlugin m_watcher->setWatchMode(QDBusServiceWatcher::WatchForRegistration | QDBusServiceWatcher::WatchForUnregistration); m_watcher->addWatchedService(CXBusServiceProxy::InterfaceName()); m_watcher->addWatchedService(CXBusTrafficProxy::InterfaceName()); - connect(m_watcher, &QDBusServiceWatcher::serviceRegistered, this, &CSimulatorXPlane::serviceRegistered); - connect(m_watcher, &QDBusServiceWatcher::serviceUnregistered, this, &CSimulatorXPlane::serviceUnregistered); + connect(m_watcher, &QDBusServiceWatcher::serviceRegistered, this, &CSimulatorXPlane::ps_serviceRegistered); + connect(m_watcher, &QDBusServiceWatcher::serviceUnregistered, this, &CSimulatorXPlane::ps_serviceUnregistered); m_fastTimer = new QTimer(this); m_slowTimer = new QTimer(this); - connect(m_fastTimer, &QTimer::timeout, this, &CSimulatorXPlane::fastTimerTimeout); - connect(m_slowTimer, &QTimer::timeout, this, &CSimulatorXPlane::slowTimerTimeout); + connect(m_fastTimer, &QTimer::timeout, this, &CSimulatorXPlane::ps_fastTimerTimeout); + connect(m_slowTimer, &QTimer::timeout, this, &CSimulatorXPlane::ps_slowTimerTimeout); m_fastTimer->start(100); m_slowTimer->start(1000); resetData(); } - void CSimulatorXPlane::fastTimerTimeout() + void CSimulatorXPlane::ps_fastTimerTimeout() { if (isConnected()) { @@ -56,7 +56,7 @@ namespace BlackSimPlugin } } - void CSimulatorXPlane::slowTimerTimeout() + void CSimulatorXPlane::ps_slowTimerTimeout() { if (isConnected()) { @@ -89,8 +89,8 @@ namespace BlackSimPlugin if (m_service->isValid() && m_traffic->isValid() && m_traffic->initialize()) { // FIXME duplication - connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::emitAircraftModelChanged); - connect(m_service, &CXBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::setAirportsInRange); + connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::ps_emitAircraftModelChanged); + connect(m_service, &CXBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::ps_setAirportsInRange); m_service->updateAirportsInRange(); m_watcher->setConnection(m_conn); emit statusChanged(ISimulator::Connected); @@ -125,15 +125,15 @@ namespace BlackSimPlugin return true; } - void CSimulatorXPlane::serviceRegistered(const QString &serviceName) + void CSimulatorXPlane::ps_serviceRegistered(const QString &serviceName) { if (serviceName == CXBusServiceProxy::InterfaceName()) { delete m_service; m_service = new CXBusServiceProxy(m_conn, this); // FIXME duplication - connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::emitAircraftModelChanged); - connect(m_service, &CXBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::setAirportsInRange); + connect(m_service, &CXBusServiceProxy::aircraftModelChanged, this, &CSimulatorXPlane::ps_emitAircraftModelChanged); + connect(m_service, &CXBusServiceProxy::airportsInRangeUpdated, this, &CSimulatorXPlane::ps_setAirportsInRange); m_service->updateAirportsInRange(); } else if (serviceName == CXBusTrafficProxy::InterfaceName()) @@ -147,7 +147,7 @@ namespace BlackSimPlugin } } - void CSimulatorXPlane::serviceUnregistered() + void CSimulatorXPlane::ps_serviceUnregistered() { delete m_service; delete m_traffic; @@ -156,7 +156,7 @@ namespace BlackSimPlugin emit statusChanged(ISimulator::Disconnected); } - void CSimulatorXPlane::emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao) + void CSimulatorXPlane::ps_emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao) { emit aircraftModelChanged({ path, true }); Q_UNUSED(filename); @@ -210,7 +210,7 @@ namespace BlackSimPlugin return { m_xplaneData.aircraftModelPath, true }; } - void CSimulatorXPlane::setAirportsInRange(const QStringList &icaos, const QStringList &names, const BlackMisc::CSequence &lats, const BlackMisc::CSequence &lons, const BlackMisc::CSequence &alts) + void CSimulatorXPlane::ps_setAirportsInRange(const QStringList &icaos, const QStringList &names, const BlackMisc::CSequence &lats, const BlackMisc::CSequence &lons, const BlackMisc::CSequence &alts) { qDebug() << alts; m_airports.clear(); diff --git a/src/plugins/simulator/xplane/simulator_xplane.h b/src/plugins/simulator/xplane/simulator_xplane.h index 5fb593451..f94176f15 100644 --- a/src/plugins/simulator/xplane/simulator_xplane.h +++ b/src/plugins/simulator/xplane/simulator_xplane.h @@ -90,12 +90,12 @@ namespace BlackSimPlugin virtual bool isSimPaused() const override { return false; } private slots: - void serviceRegistered(const QString &serviceName); - void serviceUnregistered(); - void setAirportsInRange(const QStringList &icaoCodes, const QStringList &names, const BlackMisc::CSequence &lats, const BlackMisc::CSequence &lons, const BlackMisc::CSequence &alts); - void emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao); - void fastTimerTimeout(); - void slowTimerTimeout(); + void ps_serviceRegistered(const QString &serviceName); + void ps_serviceUnregistered(); + void ps_setAirportsInRange(const QStringList &icaoCodes, const QStringList &names, const BlackMisc::CSequence &lats, const BlackMisc::CSequence &lons, const BlackMisc::CSequence &alts); + void ps_emitAircraftModelChanged(const QString &path, const QString &filename, const QString &livery, const QString &icao); + void ps_fastTimerTimeout(); + void ps_slowTimerTimeout(); private: QDBusConnection m_conn { "default" };