refactor: Remove ecosystem provider from WebDataServices

Spreading the information about the ecosystem into all
"low-level" readers, just to deactivate them when not using
a non-VATSIM ecosystem, should be avoided. Instead, the readers
should be disabled entirely from the outside . This will be done
in a upcoming refactoring (separate PR).
This commit is contained in:
Lars Toenning
2024-03-11 19:10:50 +01:00
parent 73689efa01
commit 9cdd624ae0
8 changed files with 7 additions and 52 deletions

View File

@@ -28,8 +28,7 @@ using namespace BlackCore::Data;
namespace BlackCore::Vatsim
{
CVatsimServerFileReader::CVatsimServerFileReader(QObject *owner) : CThreadedReader(owner, "CVatsimServerFileReader"),
CEcosystemAware(CEcosystemAware::providerIfPossible(owner))
CVatsimServerFileReader::CVatsimServerFileReader(QObject *owner) : CThreadedReader(owner, "CVatsimServerFileReader")
{}
CServerList CVatsimServerFileReader::getFsdServers() const
@@ -56,7 +55,6 @@ namespace BlackCore::Vatsim
this->threadAssertCheck();
if (!this->doWorkCheck()) { return; }
if (!this->isInternetAccessible("No network/internet access, cannot read VATSIM server file")) { return; }
if (this->isNotVATSIMEcosystem()) { return; }
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing application");
const QUrl url = sApp->getVatsimServerFileUrl();
@@ -70,7 +68,6 @@ namespace BlackCore::Vatsim
// required to use delete later as object is created in a different thread
QScopedPointer<QNetworkReply, QScopedPointerDeleteLater> nwReply(nwReplyPtr);
this->threadAssertCheck();
if (this->isNotVATSIMEcosystem()) { return; }
// Worker thread, make sure to write only synced here!
if (!this->doWorkCheck())