mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #485, use global setup directly from sApp where possible
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f03f3ef224
commit
b577f9313e
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ namespace BlackCore
|
||||
|
||||
CUrl CModelDataReader::getBaseUrl() const
|
||||
{
|
||||
CUrl baseUrl(m_setup.get().dbModelReaderUrl());
|
||||
const CUrl baseUrl(sApp->getGlobalSetup().dbModelReaderUrl());
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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});
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user