refs #649, made base URL static const to resolve threading issue

(crash when shutting down)
This commit is contained in:
Klaus Basan
2016-06-04 14:47:25 +02:00
parent e752a3d73b
commit c31145b3a0
5 changed files with 13 additions and 9 deletions

View File

@@ -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;
}