refactor: Remove unused server types and ecosystems

This commit is contained in:
Lars Toenning
2026-05-17 21:23:42 +02:00
parent a32b6c741e
commit 7f89426bc5
7 changed files with 4 additions and 43 deletions

View File

@@ -45,8 +45,7 @@ namespace swift::core::data
{
const CServer server(this->getLastServer());
if (server.isNull()) { return false; }
return server.getEcosystem() == CEcosystem::privateFsd() || server.getEcosystem() == CEcosystem::swiftTest() ||
server.getEcosystem() == CEcosystem::swift();
return server.getEcosystem() == CEcosystem::privateFsd();
}
void CNetworkSetup::onSettingsChanged() { emit this->setupChanged(); }

View File

@@ -29,18 +29,6 @@ namespace swift::misc::network
return e;
}
const CEcosystem &CEcosystem::swift()
{
static const CEcosystem e(Swift);
return e;
}
const CEcosystem &CEcosystem::swiftTest()
{
static const CEcosystem e(SwiftTest);
return e;
}
const CEcosystem &CEcosystem::privateFsd()
{
static const CEcosystem e(PrivateFSD);
@@ -51,16 +39,12 @@ namespace swift::misc::network
{
static const QString u("unknown");
static const QString v("VATSIM");
static const QString s("swift");
static const QString st("swift (testing)");
static const QString fsd("FSD (private)");
static const QString no("no system");
switch (this->getSystem())
{
case VATSIM: return v;
case Swift: return s;
case SwiftTest: return st;
case PrivateFSD: return fsd;
case NoSystem: return no;
case Unspecified:

View File

@@ -33,8 +33,6 @@ namespace swift::misc::network
Unspecified, //!< unspecified
NoSystem, //!< no relevant ecosystem
VATSIM, //!< VATSIM
SwiftTest, //!< swift test server
Swift, //!< Future usage
PrivateFSD //!< Private FSD environment
};
@@ -77,12 +75,6 @@ namespace swift::misc::network
//! VATSIM eco system
static const CEcosystem &vatsim();
//! swift eco system
static const CEcosystem &swift();
//! swift test eco system
static const CEcosystem &swiftTest();
//! FSD private
static const CEcosystem &privateFsd();

View File

@@ -19,7 +19,7 @@ namespace swift::misc::network
const CEcosystemList &CEcosystemList::allKnownSystems()
{
static const CEcosystemList s(
{ CEcosystem::vatsim(), CEcosystem::swift(), CEcosystem::swiftTest(), CEcosystem::privateFsd() });
{ CEcosystem::vatsim(), CEcosystem::privateFsd() });
return s;
}
} // namespace swift::misc::network

View File

@@ -74,10 +74,6 @@ namespace swift::misc::network
{
if (!this->hasProvider()) { return false; }
if (this->isCurrentEcosystemVATSIM()) { return false; }
if (this->isCurrentEcosystem(CEcosystem::swiftTest()))
{
return false;
} // our test server is supposed to be I VATSIM system
return !this->getCurrentEcosystem().isUnspecified(); // other know system which is specified
}

View File

@@ -21,7 +21,7 @@ namespace swift::misc::network
const QList<int> &CServer::allServerTypes()
{
static const QList<int> all(
{ FSDServerVatsim, VoiceServerVatsim, FSDServer, VoiceServer, WebService, Unspecified });
{ FSDServerVatsim, FSDServer, Unspecified });
return all;
}
@@ -65,7 +65,7 @@ namespace swift::misc::network
{
static const CServer s =
CServer("ES Tower", "Euroscope Tower view", "localhost", 6809, CUser(), CFsdSetup::vatsimStandard(),
CEcosystem(CEcosystem::vatsim()), CServer::VoiceServerVatsim);
CEcosystem(CEcosystem::vatsim()), CServer::FSDServer);
return s;
}
@@ -91,7 +91,6 @@ namespace swift::misc::network
// cross dependency
if (ecosystem.isSystem(CEcosystem::VATSIM)) { m_serverType = FSDServerVatsim; }
if (ecosystem.isSystem(CEcosystem::SwiftTest)) { m_serverType = FSDServerVatsim; }
return true;
}
@@ -247,19 +246,13 @@ namespace swift::misc::network
const QString &CServer::serverTypeToString(CServer::ServerType server)
{
static const QString fsdVatsim("FSD [VATSIM]");
static const QString voiceVatsim("voice [VATSIM]");
static const QString fsdLegacy("FSD (legacy)");
static const QString voice("voice");
static const QString webService("web service");
static const QString unspecified("unspecified");
switch (server)
{
case FSDServerVatsim: return fsdVatsim;
case VoiceServerVatsim: return voiceVatsim;
case FSDServer: return fsdLegacy;
case VoiceServer: return voice;
case WebService: return webService;
case Unspecified:
default: return unspecified;
}

View File

@@ -48,9 +48,6 @@ namespace swift::misc::network
Unspecified,
FSDServerVatsim,
FSDServer,
VoiceServerVatsim,
VoiceServer,
WebService,
};
//! Allows to iterate over all ServerType