Issue #77 Break cyclic dependency statusmessage <-> jsonexception

This commit is contained in:
Mat Sutcliffe
2020-08-27 13:20:34 +01:00
parent 9e0ebef5a1
commit 89659fdeaa
14 changed files with 30 additions and 40 deletions

View File

@@ -544,7 +544,7 @@ namespace BlackCore
catch (const CJsonException &ex)
{
emit this->dataRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFailed, 0, url);
msgs.push_back(ex.toStatusMessage(this, QStringLiteral("Reading countries from '%1'").arg(fileName)));
msgs.push_back(CStatusMessage::fromJsonException(ex, this, QStringLiteral("Reading countries from '%1'").arg(fileName)));
}
}
}
@@ -583,7 +583,7 @@ namespace BlackCore
catch (const CJsonException &ex)
{
emit this->dataRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFailed, 0, url);
msgs.push_back(ex.toStatusMessage(this, QStringLiteral("Reading aircraft ICAOs from '%1'").arg(fileName)));
msgs.push_back(CStatusMessage::fromJsonException(ex, this, QStringLiteral("Reading aircraft ICAOs from '%1'").arg(fileName)));
}
}
}
@@ -622,7 +622,7 @@ namespace BlackCore
catch (const CJsonException &ex)
{
emit this->dataRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFailed, 0, url);
msgs.push_back(ex.toStatusMessage(this, QStringLiteral("Reading airline ICAOs from '%1'").arg(fileName)));
msgs.push_back(CStatusMessage::fromJsonException(ex, this, QStringLiteral("Reading airline ICAOs from '%1'").arg(fileName)));
}
}
}
@@ -661,7 +661,7 @@ namespace BlackCore
catch (const CJsonException &ex)
{
emit this->dataRead(CEntityFlags::AircraftCategoryEntity, CEntityFlags::ReadFailed, 0, url);
msgs.push_back(ex.toStatusMessage(this, QStringLiteral("Reading categories from '%1'").arg(fileName)));
msgs.push_back(CStatusMessage::fromJsonException(ex, this, QStringLiteral("Reading categories from '%1'").arg(fileName)));
}
}
}