Ref T489, added "parsing" state for entity read states

This commit is contained in:
Klaus Basan
2018-12-28 13:44:35 +01:00
committed by Mat Sutcliffe
parent a908c03e93
commit efb1ac46f2
9 changed files with 23 additions and 11 deletions

View File

@@ -198,6 +198,8 @@ namespace BlackCore
return;
}
// parsing
emit this->dataRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadParsing, 0);
CAirportList airports;
CAirportList inconsistent;
if (res.isRestricted())
@@ -255,7 +257,7 @@ namespace BlackCore
{
url.appendQuery(queryLatestTimestamp(newerThan));
this->getFromNetworkAndLog(url, { this, &CAirportDataReader::parseAirportData });
emit dataRead(CEntityFlags::AirportEntity, CEntityFlags::StartRead, 0);
emit dataRead(CEntityFlags::AirportEntity, CEntityFlags::ReadStarted, 0);
}
else
{

View File

@@ -219,7 +219,7 @@ namespace BlackCore
if (entitiesTriggered != CEntityFlags::NoEntity)
{
emit this->dataRead(entitiesTriggered, CEntityFlags::StartRead, 0);
emit this->dataRead(entitiesTriggered, CEntityFlags::ReadStarted, 0);
}
}
@@ -269,6 +269,7 @@ namespace BlackCore
return;
}
emit this->dataRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadParsing, 0);
CAircraftIcaoCodeList codes;
CAircraftIcaoCodeList inconsistent;
if (res.isRestricted())
@@ -323,6 +324,7 @@ namespace BlackCore
return;
}
emit this->dataRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadParsing, 0);
CAirlineIcaoCodeList codes;
CAirlineIcaoCodeList inconsistent;
if (res.isRestricted())
@@ -375,6 +377,7 @@ namespace BlackCore
return;
}
emit this->dataRead(CEntityFlags::CountryEntity, CEntityFlags::ReadParsing, 0);
CCountryList countries;
if (res.isRestricted())
{

View File

@@ -152,7 +152,7 @@ namespace BlackCore
if (!url.isEmpty())
{
this->getFromNetworkAndLog(url, { this, &CInfoDataReader::parseInfoObjectsData});
emit this->dataRead(this->getEntityForMode(), CEntityFlags::StartRead, 0);
emit this->dataRead(this->getEntityForMode(), CEntityFlags::ReadStarted, 0);
}
else
{

View File

@@ -238,7 +238,7 @@ namespace BlackCore
if (triggeredRead != CEntityFlags::NoEntity)
{
emit dataRead(triggeredRead, CEntityFlags::StartRead, 0);
emit dataRead(triggeredRead, CEntityFlags::ReadStarted, 0);
}
}
@@ -288,6 +288,7 @@ namespace BlackCore
}
// get all or incremental set of distributor
emit this->dataRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadParsing, 0);
CLiveryList liveries;
if (res.isRestricted())
{
@@ -335,6 +336,7 @@ namespace BlackCore
}
// get all or incremental set of distributors
emit this->dataRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadParsing, 0);
CDistributorList distributors;
if (res.isRestricted())
{
@@ -383,6 +385,7 @@ namespace BlackCore
}
// get all or incremental set of models
emit this->dataRead(CEntityFlags::ModelEntity, CEntityFlags::ReadParsing, 0);
CAircraftModelList models;
if (res.isRestricted())
{