From 161aec96a72e5fc091daa03e8dfe8e361273edc3 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 8 Jul 2014 13:49:03 +0200 Subject: [PATCH] Prefix ps_ for some private slots https://dev.vatsim-germany.org/boards/22/topics/1914?r=1920#message-1920 --- src/blackcore/context_audio_impl.cpp | 10 +++++----- src/blackcore/context_audio_impl.h | 6 +++--- src/blackcore/context_network_impl.cpp | 18 +++++++++--------- src/blackcore/context_network_impl.h | 10 +++++----- src/blackcore/context_ownaircraft_impl.cpp | 2 +- src/blackcore/context_ownaircraft_impl.h | 2 +- src/blackcore/context_runtime.cpp | 16 ++++++++-------- src/blackcore/context_simulator_impl.cpp | 20 ++++++++++---------- src/blackcore/context_simulator_impl.h | 14 +++++++------- src/blackcore/vatsimbookingreader.cpp | 4 ++-- src/blackcore/vatsimbookingreader.h | 2 +- src/blackcore/vatsimdatafilereader.cpp | 4 ++-- src/blackcore/vatsimdatafilereader.h | 2 +- 13 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/blackcore/context_audio_impl.cpp b/src/blackcore/context_audio_impl.cpp index 5fe830f06..4f088cf31 100644 --- a/src/blackcore/context_audio_impl.cpp +++ b/src/blackcore/context_audio_impl.cpp @@ -42,11 +42,11 @@ namespace BlackCore // 4. Signal / slots connect(this->m_voice, &CVoiceVatlib::micTestFinished, this, &CContextAudio::audioTestCompleted); connect(this->m_voice, &CVoiceVatlib::squelchTestFinished, this, &CContextAudio::audioTestCompleted); - connect(this->m_voice, &CVoiceVatlib::connectionStatusChanged, this, &CContextAudio::connectionStatusChanged); + connect(this->m_voice, &CVoiceVatlib::connectionStatusChanged, this, &CContextAudio::ps_connectionStatusChanged); if (this->getIContextApplication()) this->connect(this->m_voice, &IVoice::statusMessage, this->getIContextApplication(), &IContextApplication::sendStatusMessage); // 5. load sounds (init), not possible in own thread - QTimer::singleShot(10 * 1000, this, SLOT(initNotificationSounds())); + QTimer::singleShot(10 * 1000, this, SLOT(ps_initNotificationSounds())); } /* @@ -299,7 +299,7 @@ namespace BlackCore /* * Notification */ - void CContextAudio::initNotificationSounds() + void CContextAudio::ps_initNotificationSounds() { // not possible in own thread CSoundGenerator::playNotificationSound(0, CNotificationSounds::NotificationsLoadSounds); @@ -358,7 +358,7 @@ namespace BlackCore /* * Settings changed */ - void CContextAudio::settingsChanged(uint typeValue) + void CContextAudio::ps_settingsChanged(uint typeValue) { if (this->getIContextOwnAircraft()) m_voice->setMyAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign()); if (!this->getIContextSettings()) return; @@ -376,7 +376,7 @@ namespace BlackCore /* * Connection status changed */ - void CContextAudio::connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus) + void CContextAudio::ps_connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus) { Q_UNUSED(comUnit); Q_UNUSED(oldStatus); diff --git a/src/blackcore/context_audio_impl.h b/src/blackcore/context_audio_impl.h index ace346f3e..b8bc59011 100644 --- a/src/blackcore/context_audio_impl.h +++ b/src/blackcore/context_audio_impl.h @@ -113,14 +113,14 @@ namespace BlackCore private slots: //! Settings have been changed - void settingsChanged(uint typeValue); + void ps_settingsChanged(uint typeValue); //! \copydoc IVoice::connectionStatusChanged //! \sa IContextAudio::changedVoiceRooms - void connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus); + void ps_connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus); //! Init notification sounds - void initNotificationSounds(); + void ps_initNotificationSounds(); private: //! Connection in transition diff --git a/src/blackcore/context_network_impl.cpp b/src/blackcore/context_network_impl.cpp index 10de3ecd9..dcd83a018 100644 --- a/src/blackcore/context_network_impl.cpp +++ b/src/blackcore/context_network_impl.cpp @@ -41,19 +41,19 @@ namespace BlackCore // 1. Init by "network driver" this->m_network = new CNetworkVatlib(this); - this->connect(this->m_network, &INetwork::connectionStatusChanged, this, &CContextNetwork::psFsdConnectionStatusChanged); - this->connect(this->m_network, &INetwork::textMessagesReceived, this, &CContextNetwork::psFsdTextMessageReceived); + this->connect(this->m_network, &INetwork::connectionStatusChanged, this, &CContextNetwork::ps_FsdConnectionStatusChanged); + this->connect(this->m_network, &INetwork::textMessagesReceived, this, &CContextNetwork::ps_FsdTextMessageReceived); // 2. VATSIM bookings this->m_vatsimBookingReader = new CVatsimBookingReader(this->getRuntime()->getIContextSettings()->getNetworkSettings().getBookingServiceUrl(), this); - this->connect(this->m_vatsimBookingReader, &CVatsimBookingReader::dataRead, this, &CContextNetwork::psReceivedBookings); + this->connect(this->m_vatsimBookingReader, &CVatsimBookingReader::dataRead, this, &CContextNetwork::ps_ReceivedBookings); this->m_vatsimBookingReader->read(); // first read this->m_vatsimBookingReader->setInterval(180 * 1000); // 3. VATSIM data file const QStringList dataFileUrls = { "http://info.vroute.net/vatsim-data.txt" }; this->m_vatsimDataFileReader = new CVatsimDataFileReader(dataFileUrls, this); - this->connect(this->m_vatsimDataFileReader, &CVatsimDataFileReader::dataRead, this, &CContextNetwork::psDataFileRead); + this->connect(this->m_vatsimDataFileReader, &CVatsimDataFileReader::dataRead, this, &CContextNetwork::ps_DataFileRead); this->m_vatsimDataFileReader->read(); // first read this->m_vatsimDataFileReader->setInterval(90 * 1000); @@ -263,7 +263,7 @@ namespace BlackCore /* * Connection status changed */ - void CContextNetwork::psFsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message) + void CContextNetwork::ps_FsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message) { this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO, { QString::number(from), QString::number(to) }); this->m_currentStatus = to; @@ -296,7 +296,7 @@ namespace BlackCore /* * Data file (VATSIM) has been read */ - void CContextNetwork::psDataFileRead() + void CContextNetwork::ps_DataFileRead() { this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO); // TODO (MS) no test for if (this->getIContextApplication()) here? @@ -306,7 +306,7 @@ namespace BlackCore /* * Radio text message received */ - void CContextNetwork::psFsdTextMessageReceived(const CTextMessageList &messages) + void CContextNetwork::ps_FsdTextMessageReceived(const CTextMessageList &messages) { this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO, messages.toQString()); this->textMessagesReceived(messages); // relay @@ -319,7 +319,7 @@ namespace BlackCore return this->getRuntime()->getCContextOwnAircraft()->ownAircraft(); } - void CContextNetwork::psChangedOwnAircraft(const CAircraft &aircraft, const QString &originator) + void CContextNetwork::ps_ChangedOwnAircraft(const CAircraft &aircraft, const QString &originator) { Q_ASSERT(this->m_network); Q_UNUSED(originator); @@ -338,7 +338,7 @@ namespace BlackCore /* * Update bookings */ - void CContextNetwork::psReceivedBookings(const CAtcStationList &) + void CContextNetwork::ps_ReceivedBookings(const CAtcStationList &) { // TODO (MS) no test for if (this->getIContextApplication()) here? this->getIContextApplication()->sendStatusMessage(CStatusMessage::getInfoMessage("Read bookings from network", CStatusMessage::TypeTrafficNetwork)); diff --git a/src/blackcore/context_network_impl.h b/src/blackcore/context_network_impl.h index 8c28dbb22..6276b7892 100644 --- a/src/blackcore/context_network_impl.h +++ b/src/blackcore/context_network_impl.h @@ -160,23 +160,23 @@ namespace BlackCore private slots: //! Own aircraft was updated - void psChangedOwnAircraft(const BlackMisc::Aviation::CAircraft &aircraft, const QString &originator); + void ps_ChangedOwnAircraft(const BlackMisc::Aviation::CAircraft &aircraft, const QString &originator); //! ATC bookings received - void psReceivedBookings(const BlackMisc::Aviation::CAtcStationList &bookedStations); + void ps_ReceivedBookings(const BlackMisc::Aviation::CAtcStationList &bookedStations); //! Data file has been read - void psDataFileRead(); + void ps_DataFileRead(); /*! * \brief Connection status changed? * \param from old status * \param to new status */ - void psFsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message); + void ps_FsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message); //! Radio text messages received - void psFsdTextMessageReceived(const BlackMisc::Network::CTextMessageList &messages); + void ps_FsdTextMessageReceived(const BlackMisc::Network::CTextMessageList &messages); }; } diff --git a/src/blackcore/context_ownaircraft_impl.cpp b/src/blackcore/context_ownaircraft_impl.cpp index 3be81d2ab..eb8e386a9 100644 --- a/src/blackcore/context_ownaircraft_impl.cpp +++ b/src/blackcore/context_ownaircraft_impl.cpp @@ -201,7 +201,7 @@ namespace BlackCore /* * Tune in / out voice room */ - void CContextOwnAircraft::changedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected) + void CContextOwnAircraft::ps_changedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected) { // any of our active frequencies? Q_UNUSED(connected); diff --git a/src/blackcore/context_ownaircraft_impl.h b/src/blackcore/context_ownaircraft_impl.h index a27ebd582..e0267c67e 100644 --- a/src/blackcore/context_ownaircraft_impl.h +++ b/src/blackcore/context_ownaircraft_impl.h @@ -76,7 +76,7 @@ namespace BlackCore private slots: //! Station has been changed, needed to tune in/out voice room //! Set in runtime - void changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected); + void ps_changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected); private: BlackMisc::Aviation::CAircraft m_ownAircraft; //!< my aircraft diff --git a/src/blackcore/context_runtime.cpp b/src/blackcore/context_runtime.cpp index 8d1dee175..15ccdf96a 100644 --- a/src/blackcore/context_runtime.cpp +++ b/src/blackcore/context_runtime.cpp @@ -411,7 +411,7 @@ namespace BlackCore { // only, when both contexts exists and only if settings originate locally c = connect(this->m_contextSettings, &IContextSettings::changedSettings, - this->getCContextAudio(), &CContextAudio::settingsChanged); + this->getCContextAudio(), &CContextAudio::ps_settingsChanged); Q_ASSERT(c); } @@ -422,11 +422,11 @@ namespace BlackCore if (this->m_contextNetwork && this->m_contextNetwork->usingLocalObjects()) { c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation, - this->getCContextSimulator(), &CContextSimulator::addAircraftSituation); + this->getCContextSimulator(), &CContextSimulator::ps_addAircraftSituation); Q_ASSERT(c); c = connect(this->m_contextNetwork, &IContextNetwork::textMessagesReceived, - this->getCContextSimulator(), &CContextSimulator::textMessagesReceived); + this->getCContextSimulator(), &CContextSimulator::ps_textMessagesReceived); Q_ASSERT(c); } @@ -434,7 +434,7 @@ namespace BlackCore if (this->m_contextOwnAircraft && this->m_contextOwnAircraft->usingLocalObjects()) { c = connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraftCockpit, - this->getCContextSimulator(), &CContextSimulator::updateCockpitFromContext); + this->getCContextSimulator(), &CContextSimulator::ps_updateCockpitFromContext); Q_ASSERT(c); } @@ -442,11 +442,11 @@ namespace BlackCore if (this->m_contextApplication && this->m_contextApplication->usingLocalObjects()) { c = connect(this->m_contextApplication, &IContextApplication::statusMessage, - this->getCContextSimulator(), &CContextSimulator::statusMessageReceived); + this->getCContextSimulator(), &CContextSimulator::ps_statusMessageReceived); Q_ASSERT(c); c = connect(this->m_contextApplication, &IContextApplication::statusMessages, - this->getCContextSimulator(), &CContextSimulator::statusMessagesReceived); + this->getCContextSimulator(), &CContextSimulator::ps_statusMessagesReceived); Q_ASSERT(c); } @@ -466,12 +466,12 @@ namespace BlackCore if (this->m_contextNetwork && this->m_contextOwnAircraft && this->m_contextNetwork->usingLocalObjects() && this->m_contextOwnAircraft->usingLocalObjects()) { c = this->connect(this->m_contextNetwork, &IContextNetwork::changedAtcStationOnlineConnectionStatus, - this->getCContextOwnAircraft(), &CContextOwnAircraft::changedAtcStationOnlineConnectionStatus); + this->getCContextOwnAircraft(), &CContextOwnAircraft::ps_changedAtcStationOnlineConnectionStatus); Q_ASSERT(c); // inject updated own aircraft to network c = this->connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraft, - this->getCContextNetwork(), &CContextNetwork::psChangedOwnAircraft); + this->getCContextNetwork(), &CContextNetwork::ps_ChangedOwnAircraft); Q_ASSERT(c); } } diff --git a/src/blackcore/context_simulator_impl.cpp b/src/blackcore/context_simulator_impl.cpp index 9fe54cdfb..c730b25b3 100644 --- a/src/blackcore/context_simulator_impl.cpp +++ b/src/blackcore/context_simulator_impl.cpp @@ -25,7 +25,7 @@ namespace BlackCore { m_updateTimer = new QTimer(this); findSimulatorPlugins(); - connect(m_updateTimer, &QTimer::timeout, this, &CContextSimulator::updateOwnAircraft); + connect(m_updateTimer, &QTimer::timeout, this, &CContextSimulator::ps_updateOwnAircraft); // do not load plugin here, as it depends on settings // it has to be guaranteed the settings are alredy loaded @@ -148,7 +148,7 @@ namespace BlackCore this->unloadSimulatorPlugin(); // old plugin unloaded m_simulator = newSimulator; - connect(m_simulator, SIGNAL(statusChanged(ISimulator::Status)), this, SLOT(setConnectionStatus(ISimulator::Status))); + connect(m_simulator, SIGNAL(statusChanged(ISimulator::Status)), this, SLOT(ps_setConnectionStatus(ISimulator::Status))); connect(m_simulator, &ISimulator::aircraftModelChanged, this, &IContextSimulator::ownAircraftModelChanged); if (this->getIContextApplication() && this->getIContextApplication()->usingLocalObjects()) { @@ -206,7 +206,7 @@ namespace BlackCore m_simulator = nullptr; } - void CContextSimulator::updateOwnAircraft() + void CContextSimulator::ps_updateOwnAircraft() { Q_ASSERT(this->getIContextOwnAircraft()); @@ -225,14 +225,14 @@ namespace BlackCore } } - void CContextSimulator::addAircraftSituation(const CCallsign &callsign, const CAircraftSituation &initialSituation) + void CContextSimulator::ps_addAircraftSituation(const CCallsign &callsign, const CAircraftSituation &initialSituation) { Q_ASSERT(this->m_simulator); if (!this->m_simulator) return; this->m_simulator->addAircraftSituation(callsign, initialSituation); } - void CContextSimulator::updateCockpitFromContext(const CAircraft &ownAircraft, const QString &originator) + void CContextSimulator::ps_updateCockpitFromContext(const CAircraft &ownAircraft, const QString &originator) { Q_ASSERT(this->m_simulator); if (!this->m_simulator) return; @@ -244,7 +244,7 @@ namespace BlackCore this->m_simulator->updateOwnSimulatorCockpit(ownAircraft); } - void CContextSimulator::setConnectionStatus(ISimulator::Status status) + void CContextSimulator::ps_setConnectionStatus(ISimulator::Status status) { if (status == ISimulator::Connected) { @@ -258,21 +258,21 @@ namespace BlackCore } } - void CContextSimulator::statusMessageReceived(const CStatusMessage &statusMessage) + void CContextSimulator::ps_statusMessageReceived(const CStatusMessage &statusMessage) { if (statusMessage.getSeverity() != CStatusMessage::SeverityError) return; this->m_simulator->displayStatusMessage(statusMessage); } - void CContextSimulator::statusMessagesReceived(const CStatusMessageList &statusMessages) + void CContextSimulator::ps_statusMessagesReceived(const CStatusMessageList &statusMessages) { foreach(CStatusMessage m, statusMessages) { - this->statusMessageReceived(m); + this->ps_statusMessageReceived(m); } } - void CContextSimulator::textMessagesReceived(const Network::CTextMessageList &textMessages) + void CContextSimulator::ps_textMessagesReceived(const Network::CTextMessageList &textMessages) { if (!this->m_simulator) return; foreach(CTextMessage tm, textMessages) diff --git a/src/blackcore/context_simulator_impl.h b/src/blackcore/context_simulator_impl.h index 8bb6cd946..5e3567606 100644 --- a/src/blackcore/context_simulator_impl.h +++ b/src/blackcore/context_simulator_impl.h @@ -91,26 +91,26 @@ namespace BlackCore private slots: //! Update own aircraft, because simulator has changed something - void updateOwnAircraft(); + void ps_updateOwnAircraft(); //! \copydoc ISimulator::addAircraftSituation - void addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &initialSituation); + void ps_addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &initialSituation); //! Update cockpit from context, because someone else has changed cockpit (e.g. GUI, 3rd party) //! \remarks set by runtime, only locally - void updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator); + void ps_updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator); //! Set new connection status - void setConnectionStatus(ISimulator::Status status); + void ps_setConnectionStatus(ISimulator::Status status); //! Status message received - void statusMessageReceived(const BlackMisc::CStatusMessage &statusMessage); + void ps_statusMessageReceived(const BlackMisc::CStatusMessage &statusMessage); //! Status messages received - void statusMessagesReceived(const BlackMisc::CStatusMessageList &statusMessages); + void ps_statusMessagesReceived(const BlackMisc::CStatusMessageList &statusMessages); //! Text message received - void textMessagesReceived(const BlackMisc::Network::CTextMessageList &textMessages); + void ps_textMessagesReceived(const BlackMisc::Network::CTextMessageList &textMessages); private: //! \brief find and catalog all simulator plugins diff --git a/src/blackcore/vatsimbookingreader.cpp b/src/blackcore/vatsimbookingreader.cpp index 5c21d29ad..d87fc6146 100644 --- a/src/blackcore/vatsimbookingreader.cpp +++ b/src/blackcore/vatsimbookingreader.cpp @@ -17,7 +17,7 @@ namespace BlackCore m_serviceUrl(url), m_networkManager(nullptr) { this->m_networkManager = new QNetworkAccessManager(this); - this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimBookingReader::loadFinished); + this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimBookingReader::ps_loadFinished); this->connect(this->m_updateTimer, &QTimer::timeout, this, &CVatsimBookingReader::read); } @@ -34,7 +34,7 @@ namespace BlackCore /* * Bookings read from XML */ - void CVatsimBookingReader::loadFinished(QNetworkReply *nwReply) + void CVatsimBookingReader::ps_loadFinished(QNetworkReply *nwReply) { this->setPendingNetworkReply(nullptr); if (!this->isStopped()) diff --git a/src/blackcore/vatsimbookingreader.h b/src/blackcore/vatsimbookingreader.h index 8d902450b..20b80eb9a 100644 --- a/src/blackcore/vatsimbookingreader.h +++ b/src/blackcore/vatsimbookingreader.h @@ -34,7 +34,7 @@ namespace BlackCore private slots: //! Bookings have been read - void loadFinished(QNetworkReply *nwReply); + void ps_loadFinished(QNetworkReply *nwReply); private: QString m_serviceUrl; /*!< URL of the service */ diff --git a/src/blackcore/vatsimdatafilereader.cpp b/src/blackcore/vatsimdatafilereader.cpp index a17a9c231..23e459d5a 100644 --- a/src/blackcore/vatsimdatafilereader.cpp +++ b/src/blackcore/vatsimdatafilereader.cpp @@ -20,7 +20,7 @@ namespace BlackCore m_serviceUrls(urls), m_currentUrlIndex(0), m_networkManager(nullptr) { this->m_networkManager = new QNetworkAccessManager(this); - this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimDataFileReader::loadFinished); + this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimDataFileReader::ps_loadFinished); this->connect(this->m_updateTimer, &QTimer::timeout, this, &CVatsimDataFileReader::read); } @@ -124,7 +124,7 @@ namespace BlackCore /* * Data file read from XML */ - void CVatsimDataFileReader::loadFinished(QNetworkReply *nwReply) + void CVatsimDataFileReader::ps_loadFinished(QNetworkReply *nwReply) { this->setPendingNetworkReply(nullptr); if (!this->isStopped()) diff --git a/src/blackcore/vatsimdatafilereader.h b/src/blackcore/vatsimdatafilereader.h index f6e08c5c4..69e982e76 100644 --- a/src/blackcore/vatsimdatafilereader.h +++ b/src/blackcore/vatsimdatafilereader.h @@ -71,7 +71,7 @@ namespace BlackCore private slots: //! Data have been read - void loadFinished(QNetworkReply *nwReply); + void ps_loadFinished(QNetworkReply *nwReply); private: QStringList m_serviceUrls; /*!< URL of the service */