Fixed reading of setup data (found during #533 debugging)

Default value for dev. mode was wrong
This commit is contained in:
Klaus Basan
2015-12-06 05:39:10 +01:00
parent 9ead44795e
commit f4eec653c1
2 changed files with 14 additions and 3 deletions

View File

@@ -26,13 +26,13 @@ namespace BlackCore
ITimestampBased(0),
m_dbHttpPort(80),
m_dbHttpsPort(443),
m_development(CProject::isRunningInDeveloperEnvironment()),
m_dbRootDirectoryUrl("http://ubuntu12/swiftdatastore/public"),
m_vatsimBookingsUrl("http://vatbook.euroutepro.com/xml2.php"),
m_vatsimMetarsUrl("http://metar.vatsim.net/metar.php"),
m_vatsimDataFileUrls(QStringList({ "http://info.vroute.net/vatsim-data.txt" })),
m_vatsimDataFileUrls(QStringList( { "http://info.vroute.net/vatsim-data.txt" })),
m_sharedUrls(CProject::swiftTeamDefaultServers()),
m_newsUrls(QStringList({ "http://swift-project.org/" })),
m_fsdTestServers({ CServer("swift", "swift Testserver", "vatsim-germany.org", 6809, CUser("1234567", "swift Test User", "", "123456"), true) })
m_newsUrls(QStringList({ "http://swift-project.org/" }))
{ }
CUrl CGlobalSetup::dbIcaoReaderUrl() const
@@ -104,6 +104,14 @@ namespace BlackCore
CGlobalSetup::versionString() + "/productive/dbdata/");
}
CServerList CGlobalSetup::fsdTestServersPlusHardcodedServers() const
{
static const CServerList hardcoded({ CServer("swift", "swift Testserver", "vatsim-germany.org", 6809, CUser("1234567", "swift Test User", "", "123456"), true) });
CServerList testServers(m_fsdTestServers);
testServers.addIfAddressNotExists(hardcoded);
return testServers;
}
QString CGlobalSetup::convertToQString(bool i18n) const
{
return convertToQString(", ", i18n);

View File

@@ -106,6 +106,9 @@ namespace BlackCore
//! FSD test servers
const BlackMisc::Network::CServerList &fsdTestServers() const { return m_fsdTestServers; }
//! FSD test servers plus hardcoded
BlackMisc::Network::CServerList fsdTestServersPlusHardcodedServers() const;
//! Productive settings?
bool isDevelopment() const { return m_development; }