refs #485, use global setup directly from sApp where possible

This commit is contained in:
Klaus Basan
2016-02-27 22:24:24 +01:00
committed by Mathew Sutcliffe
parent f03f3ef224
commit b577f9313e
8 changed files with 5 additions and 16 deletions

View File

@@ -177,7 +177,7 @@ namespace BlackCore
CUrl CIcaoDataReader::getBaseUrl() const
{
CUrl baseUrl(this->m_setup.get().dbIcaoReaderUrl());
const CUrl baseUrl(sApp->getGlobalSetup().dbIcaoReaderUrl());
return baseUrl;
}

View File

@@ -14,7 +14,6 @@
#include "blackcore/blackcoreexport.h"
#include "blackcore/databasereader.h"
#include "blackcore/data/globalsetup.h"
#include "blackmisc/countrylist.h"
#include "blackmisc/aviation/aircrafticaocodelist.h"
#include "blackmisc/aviation/airlineicaocodelist.h"
@@ -131,8 +130,6 @@ namespace BlackCore
mutable QReadWriteLock m_lockAircraft;
mutable QReadWriteLock m_lockCountry;
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
//! Base URL
BlackMisc::Network::CUrl getBaseUrl() const;

View File

@@ -418,7 +418,7 @@ namespace BlackCore
CUrl CModelDataReader::getBaseUrl() const
{
CUrl baseUrl(m_setup.get().dbModelReaderUrl());
const CUrl baseUrl(sApp->getGlobalSetup().dbModelReaderUrl());
return baseUrl;
}

View File

@@ -14,7 +14,6 @@
#include "blackcore/blackcoreexport.h"
#include "blackcore/databasereader.h"
#include "blackcore/data/globalsetup.h"
#include "blackmisc/aviation/liverylist.h"
#include "blackmisc/simulation/distributorlist.h"
#include "blackmisc/simulation/aircraftmodellist.h"
@@ -143,8 +142,6 @@ namespace BlackCore
mutable QReadWriteLock m_lockLivery;
mutable QReadWriteLock m_lockModels;
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
//! Base URL
BlackMisc::Network::CUrl getBaseUrl() const;

View File

@@ -63,7 +63,7 @@ namespace BlackCore
void CVatsimMetarReader::ps_readMetars()
{
this->threadAssertCheck();
QUrl url(m_setup.get().vatsimMetarsUrl());
const CUrl url(sApp->getGlobalSetup().vatsimMetarsUrl());
if (url.isEmpty()) { return; }
Q_ASSERT_X(sApp, Q_FUNC_INFO, "No Application");
sApp->getFromNetwork(url, { this, &CVatsimMetarReader::ps_decodeMetars});

View File

@@ -13,7 +13,6 @@
#define BLACKCORE_VATSIMMETARREADER_H
#include "blackcoreexport.h"
#include "blackcore/data/globalsetup.h"
#include "blackmisc/threadedreader.h"
#include "blackmisc/weather/metardecoder.h"
#include "blackmisc/weather/metarset.h"
@@ -70,7 +69,6 @@ namespace BlackCore
private:
BlackMisc::Weather::CMetarDecoder m_metarDecoder;
BlackMisc::Weather::CMetarSet m_metars;
BlackMisc::CData<BlackCore::Data::GlobalSetup> m_setup {this}; //!< setup cache
};
}
#endif // guard