mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
committed by
Mathew Sutcliffe
parent
e033cfacfd
commit
3ed2068ff5
@@ -155,7 +155,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessageList CAirlineIcaoCode::validate() const
|
||||
{
|
||||
static const CLogCategoryList cats( { CLogCategory(this->getClassName()), CLogCategory::validation()});
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
CStatusMessageList msgs;
|
||||
if (!hasValidDesignator()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Airline: missing designator")); }
|
||||
if (!hasValidCountry()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Airline: missing country")); }
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessageList CLivery::validate() const
|
||||
{
|
||||
static const CLogCategoryList cats( { CLogCategory(this->getClassName()), CLogCategory::validation()});
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
CStatusMessageList msg;
|
||||
if (!hasCombinedCode()) { msg.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Livery: missing livery code")); }
|
||||
if (!hasColorFuselage()) { msg.push_back(CStatusMessage(cats, CStatusMessage::SeverityWarning, "Livery: no fuselage color")); }
|
||||
|
||||
@@ -381,7 +381,8 @@ QString BlackMisc::bytesToHexString(const QByteArray &bytes)
|
||||
QString h;
|
||||
for (int i = 0; i < bytes.size(); i++)
|
||||
{
|
||||
h.append(static_cast<int>(bytes.at(i)));
|
||||
int b = static_cast<int>(bytes.at(i));
|
||||
h.append(intToHex(b, 2));
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessageList CAircraftModel::validate(bool withNestedObjects) const
|
||||
{
|
||||
static const CLogCategoryList cats( { CLogCategory(this->getClassName()), CLogCategory::validation()});
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
CStatusMessageList msgs;
|
||||
if (!hasModelString()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: missing model string (aka key)")); }
|
||||
if (!hasValidSimulator()) {msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Model: no simulator set")); }
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace BlackMisc
|
||||
|
||||
CStatusMessageList CDistributor::validate() const
|
||||
{
|
||||
static const CLogCategoryList cats( { CLogCategory(this->getClassName()), CLogCategory::validation()});
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
CStatusMessageList msgs;
|
||||
if (!hasValidDbKey()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityError, "Distributor: missing id")); }
|
||||
if (!hasDescription()) { msgs.push_back(CStatusMessage(cats, CStatusMessage::SeverityWarning, "Distributor: missing description")); }
|
||||
|
||||
Reference in New Issue
Block a user