From 8bb47a555cfa2629a64d296e110c5f7faa7c749f Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 14 Jan 2018 04:26:55 +0100 Subject: [PATCH] Formatting comments and "private slots" -> "private" --- .../context/contextownaircraftimpl.cpp | 8 +++---- .../context/contextownaircraftimpl.h | 23 +++++++++---------- src/blackcore/corefacade.cpp | 4 ++-- src/blackcore/db/databasereader.h | 4 ++-- src/blackcore/db/infodatareader.h | 3 ++- src/blackcore/webdataservices.h | 12 ++++++---- .../swiftguistdapplication.cpp | 2 +- 7 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/blackcore/context/contextownaircraftimpl.cpp b/src/blackcore/context/contextownaircraftimpl.cpp index 0f6299555..1b104210e 100644 --- a/src/blackcore/context/contextownaircraftimpl.cpp +++ b/src/blackcore/context/contextownaircraftimpl.cpp @@ -62,7 +62,7 @@ namespace BlackCore if (sApp && sApp->getWebDataServices()) { - connect(sApp->getWebDataServices(), &CWebDataServices::allSwiftDbDataRead, this, &CContextOwnAircraft::ps_allSwiftWebDataRead); + connect(sApp->getWebDataServices(), &CWebDataServices::allSwiftDbDataRead, this, &CContextOwnAircraft::allSwiftWebDataRead); } // Init own aircraft @@ -322,7 +322,7 @@ namespace BlackCore if (this->getIContextAudio()) this->getIContextAudio()->setVoiceOutputVolume(outputVolume); } - void CContextOwnAircraft::ps_changedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected) + void CContextOwnAircraft::changedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected) { // any of our active frequencies? Q_UNUSED(connected); @@ -331,12 +331,12 @@ namespace BlackCore this->resolveVoiceRooms(); } - void CContextOwnAircraft::ps_changedSimulatorModel(const CAircraftModel &model) + void CContextOwnAircraft::changedSimulatorModel(const CAircraftModel &model) { this->updateOwnModel(model); } - void CContextOwnAircraft::ps_allSwiftWebDataRead() + void CContextOwnAircraft::allSwiftWebDataRead() { // we should already have received a reverse lookup model // from the driver diff --git a/src/blackcore/context/contextownaircraftimpl.h b/src/blackcore/context/contextownaircraftimpl.h index b60cf38c9..f0e5d7d38 100644 --- a/src/blackcore/context/contextownaircraftimpl.h +++ b/src/blackcore/context/contextownaircraftimpl.h @@ -174,18 +174,6 @@ namespace BlackCore //! Register myself in DBus CContextOwnAircraft *registerWithDBus(BlackMisc::CDBusServer *server); - private slots: - //! Station has been changed, needed to tune in/out voice room - //! \ingroup crosscontextslot - void ps_changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected); - - //! Simulator model has been changed - //! \ingroup crosscontextslot - void ps_changedSimulatorModel(const BlackMisc::Simulation::CAircraftModel &model); - - //! Web data loaded - void ps_allSwiftWebDataRead(); - private: BlackMisc::Simulation::CSimulatedAircraft m_ownAircraft; //!< my aircraft bool m_automaticVoiceRoomResolution = true; //!< automatic voice room resolution, or disable for override @@ -195,6 +183,17 @@ namespace BlackCore BlackMisc::CSetting m_currentNetworkServer { this }; + //! Station has been changed, needed to tune in/out voice room + //! \ingroup crosscontextslot + void changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected); + + //! Simulator model has been changed + //! \ingroup crosscontextslot + void changedSimulatorModel(const BlackMisc::Simulation::CAircraftModel &model); + + //! Web data loaded + void allSwiftWebDataRead(); + //! Init my very own aircraft with some defaults, before overridden by simulator void initOwnAircraft(); diff --git a/src/blackcore/corefacade.cpp b/src/blackcore/corefacade.cpp index 88eed26b4..f4f9e442c 100644 --- a/src/blackcore/corefacade.cpp +++ b/src/blackcore/corefacade.cpp @@ -232,7 +232,7 @@ namespace BlackCore this->getCContextSimulator(), &CContextSimulator::ps_updateSimulatorSelcalFromContext); Q_ASSERT(c); c = connect(this->getCContextSimulator(), &CContextSimulator::ownAircraftModelChanged, - this->getCContextOwnAircraft(), &CContextOwnAircraft::ps_changedSimulatorModel); + this->getCContextOwnAircraft(), &CContextOwnAircraft::changedSimulatorModel); Q_ASSERT(c); } @@ -245,7 +245,7 @@ namespace BlackCore if (m_contextNetwork && m_contextOwnAircraft && m_contextNetwork->isUsingImplementingObject() && m_contextOwnAircraft->isUsingImplementingObject()) { c = connect(m_contextNetwork, &IContextNetwork::changedAtcStationOnlineConnectionStatus, - this->getCContextOwnAircraft(), &CContextOwnAircraft::ps_changedAtcStationOnlineConnectionStatus); + this->getCContextOwnAircraft(), &CContextOwnAircraft::changedAtcStationOnlineConnectionStatus); Q_ASSERT(c); times.insert("Post setup, connects network", time.restart()); } diff --git a/src/blackcore/db/databasereader.h b/src/blackcore/db/databasereader.h index d85776376..588a722b4 100644 --- a/src/blackcore/db/databasereader.h +++ b/src/blackcore/db/databasereader.h @@ -241,10 +241,10 @@ namespace BlackCore //! Is the shared info timestamp newer than cache timestamp? bool isSharedInfoObjectNewerThanCacheTimestamp(BlackMisc::Network::CEntityFlags::Entity entity) const; - //! Those entities where the timestamp of header is newer than the cache timestamp + //! Those entities where the timestamp of the header is newer than the cache timestamp BlackMisc::Network::CEntityFlags::Entity getEntitesWithNewerHeaderTimestamp(BlackMisc::Network::CEntityFlags::Entity entities) const; - //! Those entities where the timestamp of shared info obejct is newer than the cache timestamp + //! Those entities where the timestamp of a shared info object is newer than the cache timestamp BlackMisc::Network::CEntityFlags::Entity getEntitesWithNewerSharedInfoObject(BlackMisc::Network::CEntityFlags::Entity entities) const; //! Request headers of shared file diff --git a/src/blackcore/db/infodatareader.h b/src/blackcore/db/infodatareader.h index 4631290aa..a7ad2472d 100644 --- a/src/blackcore/db/infodatareader.h +++ b/src/blackcore/db/infodatareader.h @@ -78,7 +78,8 @@ namespace BlackCore //! URL shared info objects BlackMisc::Network::CUrl getSharedInfoObjectsUrl() const; - //! Entity for mode + //! Info object entity for mode + //! \remark CEntityFlags::DbInfoObjectEntity or CEntityFlags::SharedInfoObjectEntity BlackMisc::Network::CEntityFlags::EntityFlag getEntityForMode() const; BlackMisc::Db::CDbFlags::DataRetrievalModeFlag m_mode; //!< shared or DB web service? diff --git a/src/blackcore/webdataservices.h b/src/blackcore/webdataservices.h index 13118b5e8..b877a2adb 100644 --- a/src/blackcore/webdataservices.h +++ b/src/blackcore/webdataservices.h @@ -375,10 +375,10 @@ namespace BlackCore //! \note requires info objects loaded upfront and uses the full cache logic BlackMisc::Network::CEntityFlags::Entity triggerRead(BlackMisc::Network::CEntityFlags::Entity whatToRead, const QDateTime &newerThan = QDateTime()); - //! Trigger reload from DB, only loads the DB data and bypasses the caches checks and info objects + //! Trigger reload from DB, loads the DB data and bypasses the caches checks and info objects BlackMisc::Network::CEntityFlags::Entity triggerLoadingDirectlyFromDb(BlackMisc::Network::CEntityFlags::Entity whatToRead, const QDateTime &newerThan = QDateTime()); - //! Trigger reload from shared files, only loads the data and bypasses caches + //! Trigger reload from shared files, loads the data and bypasses caches BlackMisc::Network::CEntityFlags::Entity triggerLoadingDirectlyFromSharedFiles(BlackMisc::Network::CEntityFlags::Entity whatToRead, bool checkCacheTsUpfront); //! Corresponding cache timestamp if applicable @@ -421,12 +421,16 @@ namespace BlackCore //! Reset the flags what was already signaled void resetSignalFlags(); - //! All DB data for an aircraft entity available? + //! Are all DB data for an aircraft entity available? bool hasDbAircraftData() const; - //! Admit all DB caches + //! Admit all DB caches specified void admitDbCaches(BlackMisc::Network::CEntityFlags::Entity entities); + //! Synchronize all DB caches specified + //! \remark can be slow if all data are forced to be loaded + void synchronizeDbCaches(BlackMisc::Network::CEntityFlags::Entity entities); + //! Write data to disk (mainly for testing scenarios) bool writeDbDataToDisk(const QString &dir) const; diff --git a/src/swiftguistandard/swiftguistdapplication.cpp b/src/swiftguistandard/swiftguistdapplication.cpp index 2b5b29973..6be65c65d 100644 --- a/src/swiftguistandard/swiftguistdapplication.cpp +++ b/src/swiftguistandard/swiftguistdapplication.cpp @@ -95,7 +95,7 @@ bool CSwiftGuiStdApplication::parsingHookIn() // check if rechable if (!CDBusServer::isDBusAvailable(dBusAddress)) { - this->cmdLineErrorMessage("DBus server at " + dBusAddress + " can not be reached"); + this->cmdLineErrorMessage("DBus server at '" + dBusAddress + "' can not be reached"); return false; } }