diff --git a/src/blackcore/context/contextaudio.cpp b/src/blackcore/context/contextaudio.cpp index 90bca9fa5..6457b5264 100644 --- a/src/blackcore/context/contextaudio.cpp +++ b/src/blackcore/context/contextaudio.cpp @@ -236,7 +236,10 @@ namespace BlackCore if (m_voiceClient) { m_voiceClient->startAudio(); - this->connectAudioWithNetworkCredentials(); + const bool connected = this->connectAudioWithNetworkCredentials(); + Q_UNUSED(connected) + + // one reason for not connecting is NOT using the VATSIM ecosystem } } @@ -564,10 +567,13 @@ namespace BlackCore Q_UNUSED(from) BLACK_VERIFY_X(this->getIContextNetwork(), Q_FUNC_INFO, "Missing network context"); - // we only change network connection of AFC client here + // we only change network connection of AFV client here if (to.isConnected() && this->getIContextNetwork()) { - this->connectAudioWithNetworkCredentials(); + const bool connected = this->connectAudioWithNetworkCredentials(); + Q_UNUSED(connected) + + // one reason for not connecting is NOT using the VATSIM ecosystem } else if (to.isDisconnected()) { diff --git a/src/blackcore/fsd/fsdclient.cpp b/src/blackcore/fsd/fsdclient.cpp index 649a6c6c1..da5f88da2 100644 --- a/src/blackcore/fsd/fsdclient.cpp +++ b/src/blackcore/fsd/fsdclient.cpp @@ -80,6 +80,18 @@ namespace BlackCore return escaped; } + const CLogCategoryList &CFSDClient::getLogCategories() + { + static const CLogCategoryList cats = [] + { + CLogCategoryList cl = CContinuousWorker::getLogCategories(); + cl.push_back(CLogCategory::network()); + cl.push_back(CLogCategory::fsd()); + return cl; + }(); + return cats; + } + CFSDClient::CFSDClient(IClientProvider *clientProvider, IOwnAircraftProvider *ownAircraftProvider, IRemoteAircraftProvider *remoteAircraftProvider, diff --git a/src/blackcore/fsd/fsdclient.h b/src/blackcore/fsd/fsdclient.h index 2a83d4b66..3681dfca4 100644 --- a/src/blackcore/fsd/fsdclient.h +++ b/src/blackcore/fsd/fsdclient.h @@ -82,6 +82,9 @@ namespace BlackCore Q_INTERFACES(BlackMisc::Network::IEcosystemProvider) public: + //! Categories + static const BlackMisc::CLogCategoryList &getLogCategories(); + //! Ctor CFSDClient(BlackMisc::Network::IClientProvider *clientProvider, BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider, diff --git a/src/blackgui/components/audioadvanceddistributedcomponent.cpp b/src/blackgui/components/audioadvanceddistributedcomponent.cpp index 4b0798b6e..5a0883806 100644 --- a/src/blackgui/components/audioadvanceddistributedcomponent.cpp +++ b/src/blackgui/components/audioadvanceddistributedcomponent.cpp @@ -52,7 +52,10 @@ namespace BlackGui sGui->getCContextAudioBase()->afvClient()->startAudio(); if (sGui->getIContextNetwork()->isConnected()) { - sGui->getCContextAudioBase()->connectAudioWithNetworkCredentials(); + const bool connected = sGui->getCContextAudioBase()->connectAudioWithNetworkCredentials(); + Q_UNUSED(connected) + + // one reason for not connecting is NOT using the VATSIM ecosystem } } diff --git a/src/blackmisc/logcategory.h b/src/blackmisc/logcategory.h index d20227366..d69cf274b 100644 --- a/src/blackmisc/logcategory.h +++ b/src/blackmisc/logcategory.h @@ -270,6 +270,13 @@ namespace BlackMisc return cat; } + //! FSD specific + static const CLogCategory &fsd() + { + static const CLogCategory cat { "swift.fsd" }; + return cat; + } + //! Aviation specific static const CLogCategory &aviation() { @@ -294,6 +301,7 @@ namespace BlackMisc download(), driver(), flightPlan(), + fsd(), guiComponent(), interpolator(), json(), diff --git a/src/blackmisc/logpattern.cpp b/src/blackmisc/logpattern.cpp index 15ad30783..d94b2a9c9 100644 --- a/src/blackmisc/logpattern.cpp +++ b/src/blackmisc/logpattern.cpp @@ -31,6 +31,7 @@ namespace BlackMisc { "downloading data", exactMatch(CLogCategory::download()) }, { "driver", exactMatch(CLogCategory::driver()) }, { "flight plan", exactMatch(CLogCategory::flightPlan()) }, + { "FSD", exactMatch(CLogCategory::fsd()) }, { "interpolator", exactMatch(CLogCategory::interpolator()) }, { "JSON (conversion)", exactMatch(CLogCategory::json()) }, { "model cache", exactMatch(CLogCategory::modelCache()) }, @@ -321,7 +322,7 @@ namespace BlackMisc QString CLogPattern::convertToQString(bool i18n) const { - Q_UNUSED(i18n); + Q_UNUSED(i18n) QString strategy; QString categories = m_strings.values().join("|"); // clazy:exclude=container-anti-pattern switch (m_strategy)