diff --git a/src/blackcore/data/globalsetup.cpp b/src/blackcore/data/globalsetup.cpp index 5126851cb..b1b89b53b 100644 --- a/src/blackcore/data/globalsetup.cpp +++ b/src/blackcore/data/globalsetup.cpp @@ -245,8 +245,7 @@ namespace BlackCore::Data CServerList CGlobalSetup::getPredefinedServersPlusHardcodedServers() const { static const CServerList hardcoded( - { CServer::swiftFsdTestServer(), - CServer::fscFsdServer(), + { CServer::fscFsdServer(), CServer::esTowerView() }); CServerList testServers(m_predefinedServers); testServers.addIfAddressNotExists(hardcoded); diff --git a/src/blackmisc/network/server.cpp b/src/blackmisc/network/server.cpp index 20a556063..18fa48251 100644 --- a/src/blackmisc/network/server.cpp +++ b/src/blackmisc/network/server.cpp @@ -54,19 +54,6 @@ namespace BlackMisc::Network return QStringLiteral("%1 %2 %3:%4 %5 %6 accepting: %7 FSD: %8 con.since: %9").arg(m_name, m_description, m_address).arg(m_port).arg(m_user.toQString(i18n), m_ecosystem.getSystemString(), boolToYesNo(m_isAcceptingConnections), m_fsdSetup.toQString(i18n), this->isConnected() ? this->getFormattedUtcTimestampHms() : "not con."); } - const CServer &CServer::swiftFsdTestServer(bool withPw) - { - // CUser("guest", "Guest Client project", "", "guest") - // PW!!!!! => use CObfuscation::endocde to get the strings - static const CServer dvp("Testserver", "Client project testserver", "fsd.swift-project.org", 6809, - CUser("OBF:AwJ6BweZqpmtmORL", "OBF:AwI/594lQTJGZnmSwB0=", "", "OBF:AwKi3JkHNAczBno="), - CFsdSetup(), CVoiceSetup(), CEcosystem(CEcosystem::swiftTest()), CServer::FSDServerVatsim); - static const CServer dvnWithPw("Testserver", "Client project testserver", "fsd.swift-project.org", 6809, - CUser("OBF:AwJ6BweZqpmtmORL", "OBF:AwI/594lQTJGZnmSwB0=", "", ""), - CFsdSetup(), CVoiceSetup(), CEcosystem(CEcosystem::swiftTest()), CServer::FSDServerVatsim); - return withPw ? dvp : dvnWithPw; - } - const CServer &CServer::fscFsdServer() { static const CServer fsc = [] { diff --git a/src/blackmisc/network/server.h b/src/blackmisc/network/server.h index bb60d49ae..890ad188f 100644 --- a/src/blackmisc/network/server.h +++ b/src/blackmisc/network/server.h @@ -208,9 +208,6 @@ namespace BlackMisc::Network //! \copydoc BlackMisc::Mixin::String::toQString() QString convertToQString(bool i18n = false) const; - //! swift FSD test server - static const CServer &swiftFsdTestServer(bool withPw = false); - //! FSC server static const CServer &fscFsdServer(); diff --git a/src/blackmisc/network/settings/serversettings.h b/src/blackmisc/network/settings/serversettings.h index c00b3f3da..73e3831b5 100644 --- a/src/blackmisc/network/settings/serversettings.h +++ b/src/blackmisc/network/settings/serversettings.h @@ -46,7 +46,7 @@ namespace BlackMisc::Network::Settings //! \copydoc BlackMisc::TSettingTrait::defaultValue static const BlackMisc::Network::CServer &defaultValue() { - static const CServer dv = CServer::swiftFsdTestServer(); + static const CServer dv; return dv; } }; diff --git a/tests/blackcore/fsd/testfsdclient/testfsdclient.cpp b/tests/blackcore/fsd/testfsdclient/testfsdclient.cpp index dde0b8ab7..0aeeb27d9 100644 --- a/tests/blackcore/fsd/testfsdclient/testfsdclient.cpp +++ b/tests/blackcore/fsd/testfsdclient/testfsdclient.cpp @@ -26,6 +26,7 @@ using namespace BlackMisc; using namespace BlackMisc::Aviation; +using namespace BlackMisc::Audio; using namespace BlackMisc::Geo; using namespace BlackMisc::PhysicalQuantities; using namespace BlackMisc::Network; @@ -101,6 +102,8 @@ namespace BlackFsdTest private: CFSDClient *m_client = nullptr; + + const CServer &localTestServer(); }; void CTestFSDClient::initTestCase() @@ -108,9 +111,17 @@ namespace BlackFsdTest BlackMisc::registerMetadata(); } + const CServer &CTestFSDClient::localTestServer() + { + static const CServer dvp("Testserver", "Client project testserver", "localhost", 6809, + CUser("1234567", "Test User", "", "123456"), + CFsdSetup(), CVoiceSetup(), CEcosystem(CEcosystem::swiftTest()), CServer::FSDServerVatsim); + return dvp; + } + void CTestFSDClient::init() { - const CServer server = CServer::swiftFsdTestServer(true); + const CServer server = localTestServer(); COwnAircraftProviderDummy::instance()->updateOwnCallsign("ABCD"); CLivery livery; @@ -841,7 +852,7 @@ namespace BlackFsdTest // void CTestFSDClient::testConnection() // { - // const CServer fsdServer = CServer::swiftFsdTestServer(true); + // const CServer fsdServer = localTestServer(); // if (!pingServer(fsdServer)) { QSKIP("Server not reachable."); } // // QSignalSpy spy(m_client, &CFSDClient::connectionStatusChanged); diff --git a/tests/blackmisc/aviation/testaviation/testaviation.cpp b/tests/blackmisc/aviation/testaviation/testaviation.cpp index 09312a75f..196e28476 100644 --- a/tests/blackmisc/aviation/testaviation/testaviation.cpp +++ b/tests/blackmisc/aviation/testaviation/testaviation.cpp @@ -35,6 +35,7 @@ #include using namespace BlackMisc::Aviation; +using namespace BlackMisc::Audio; using namespace BlackMisc::PhysicalQuantities; using namespace BlackMisc::Network; using namespace BlackMisc::Geo; @@ -308,7 +309,9 @@ namespace BlackMiscTest const CUser user2(user1); QVERIFY2(user1 == user2, "information shall be equal"); - const CServer server1 = CServer::swiftFsdTestServer(); + const CServer server1 = CServer("Testserver", "Client project testserver", "localhost", 6809, + CUser("111111", "My Name", "", "123"), + CFsdSetup(), CVoiceSetup(), CEcosystem(CEcosystem::swiftTest()), CServer::FSDServerVatsim); const CServer server2(server1); QVERIFY2(server1 == server2, "server shall be equal");