mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
refs #649, made base URL static const to resolve threading issue
(crash when shutting down)
This commit is contained in:
@@ -41,7 +41,8 @@ namespace BlackCore
|
||||
CIcaoDataReader::CIcaoDataReader(QObject *owner, const CDatabaseReaderConfigList &confg) :
|
||||
CDatabaseReader(owner, confg, "CIcaoDataReader")
|
||||
{
|
||||
// void
|
||||
// init to avoid threading issues
|
||||
getBaseUrl();
|
||||
}
|
||||
|
||||
CAircraftIcaoCodeList CIcaoDataReader::getAircraftIcaoCodes() const
|
||||
@@ -209,9 +210,9 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
CUrl CIcaoDataReader::getBaseUrl() const
|
||||
const CUrl &CIcaoDataReader::getBaseUrl()
|
||||
{
|
||||
const CUrl baseUrl(sApp->getGlobalSetup().getDbIcaoReaderUrl());
|
||||
static const CUrl baseUrl(sApp->getGlobalSetup().getDbIcaoReaderUrl());
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user