Style, typo

This commit is contained in:
Klaus Basan
2019-07-16 00:59:44 +02:00
committed by Mat Sutcliffe
parent 4237839bbd
commit 1b4aa1162a
4 changed files with 18 additions and 17 deletions

View File

@@ -953,7 +953,7 @@ namespace BlackCore
// model found // model found
lookupModel.setCallsign(callsign); lookupModel.setCallsign(callsign);
// Script // script
if (runMatchinScript && setup.doRunMsReverseLookupScript()) if (runMatchinScript && setup.doRunMsReverseLookupScript())
{ {
const MatchingScriptReturnValues rv = CAircraftMatcher::reverseLookupScript(lookupModel, setup, log); const MatchingScriptReturnValues rv = CAircraftMatcher::reverseLookupScript(lookupModel, setup, log);

View File

@@ -355,12 +355,12 @@ namespace BlackMisc
const ColumnIndex i = index.frontCasted<ColumnIndex>(); const ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i) switch (i)
{ {
case IndexDescription: return CVariant::fromValue(m_description);
case IndexAirlineIcaoCode: return m_airline.propertyByIndex(index.copyFrontRemoved()); case IndexAirlineIcaoCode: return m_airline.propertyByIndex(index.copyFrontRemoved());
case IndexColorFuselage: return m_colorFuselage.propertyByIndex(index.copyFrontRemoved());; case IndexColorFuselage: return m_colorFuselage.propertyByIndex(index.copyFrontRemoved());;
case IndexColorTail: return m_colorTail.propertyByIndex(index.copyFrontRemoved()); case IndexColorTail: return m_colorTail.propertyByIndex(index.copyFrontRemoved());
case IndexCombinedCode: return CVariant::fromValue(m_combinedCode); case IndexDescription: return CVariant::fromValue(m_description);
case IndexIsMilitary: return CVariant::fromValue(m_military); case IndexCombinedCode: return CVariant::fromValue(m_combinedCode);
case IndexIsMilitary: return CVariant::fromValue(m_military);
default: return CValueObject::propertyByIndex(index); default: return CValueObject::propertyByIndex(index);
} }
} }
@@ -372,12 +372,12 @@ namespace BlackMisc
const ColumnIndex i = index.frontCasted<ColumnIndex>(); const ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i) switch (i)
{ {
case IndexDescription: m_description = variant.toQString(false); break; case IndexDescription: m_description = variant.toQString(false); break;
case IndexAirlineIcaoCode: m_airline.setPropertyByIndex(index.copyFrontRemoved(), variant); break; case IndexAirlineIcaoCode: m_airline.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
case IndexColorFuselage: m_colorFuselage.setPropertyByIndex(index.copyFrontRemoved(), variant); break; case IndexColorFuselage: m_colorFuselage.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
case IndexColorTail: m_colorTail.setPropertyByIndex(index.copyFrontRemoved(), variant); break; case IndexColorTail: m_colorTail.setPropertyByIndex(index.copyFrontRemoved(), variant); break;
case IndexCombinedCode: this->setCombinedCode(variant.toQString(false)); break; case IndexCombinedCode: this->setCombinedCode(variant.toQString(false)); break;
case IndexIsMilitary: this->setMilitary(variant.toBool()); break; case IndexIsMilitary: this->setMilitary(variant.toBool()); break;
default: CValueObject::setPropertyByIndex(index, variant); break; default: CValueObject::setPropertyByIndex(index, variant); break;
} }
} }

View File

@@ -8,6 +8,7 @@
#include "matchingutils.h" #include "matchingutils.h"
#include "aircraftmodel.h" #include "aircraftmodel.h"
#include "blackmisc/aviation/logutils.h"
#include "blackmisc/db/datastoreutility.h" #include "blackmisc/db/datastoreutility.h"
#include "blackmisc/comparefunctions.h" #include "blackmisc/comparefunctions.h"
#include "blackmisc/fileutils.h" #include "blackmisc/fileutils.h"
@@ -495,8 +496,8 @@ namespace BlackMisc
{ {
switch (this->getModelMode()) switch (this->getModelMode())
{ {
case Include: return CIcon::iconByIndex(CIcons::ModelInclude); case Include: return CIcon::iconByIndex(CIcons::ModelInclude);
case Exclude: return CIcon::iconByIndex(CIcons::ModelExclude); case Exclude: return CIcon::iconByIndex(CIcons::ModelExclude);
case Undefined: return CIcon::iconByIndex(CIcons::StandardIconUnknown16); case Undefined: return CIcon::iconByIndex(CIcons::StandardIconUnknown16);
default: default:
Q_ASSERT_X(false, Q_FUNC_INFO, "wrong mode"); Q_ASSERT_X(false, Q_FUNC_INFO, "wrong mode");
@@ -580,7 +581,7 @@ namespace BlackMisc
return p; return p;
} }
bool CAircraftModel::isSwiftLiyeryString(const QString &liveryString) bool CAircraftModel::isSwiftLiveryString(const QString &liveryString)
{ {
return (liveryString.length() > liveryStringPrefix().length() && liveryString.startsWith(liveryStringPrefix(), Qt::CaseInsensitive)); return (liveryString.length() > liveryStringPrefix().length() && liveryString.startsWith(liveryStringPrefix(), Qt::CaseInsensitive));
} }
@@ -598,7 +599,7 @@ namespace BlackMisc
DBTripleIds CAircraftModel::parseNetworkLiveryString(const QString &liveryString) DBTripleIds CAircraftModel::parseNetworkLiveryString(const QString &liveryString)
{ {
// "swift_m22l33a11" // "swift_m22l33a11"
if (!CAircraftModel::isSwiftLiyeryString(liveryString)) {return DBTripleIds(); } if (!CAircraftModel::isSwiftLiveryString(liveryString)) { return DBTripleIds(); }
DBTripleIds ids; DBTripleIds ids;
const QString ls = liveryString.mid(liveryStringPrefix().length()).toLower(); const QString ls = liveryString.mid(liveryStringPrefix().length()).toLower();

View File

@@ -80,7 +80,7 @@ namespace BlackMisc
enum ModelType enum ModelType
{ {
TypeUnknown, TypeUnknown,
TypeQueriedFromNetwork, //!< model was queried by network protocol TypeQueriedFromNetwork, //!< model was queried by network protocol (ICAO data)
TypeFSInnData, //!< model based on FSD ICAO data TypeFSInnData, //!< model based on FSD ICAO data
TypeReverseLookup, //!< reverse lookup model TypeReverseLookup, //!< reverse lookup model
TypeModelMatching, //!< model is result of model matching TypeModelMatching, //!< model is result of model matching
@@ -530,7 +530,7 @@ namespace BlackMisc
static const QString &liveryStringPrefix(); static const QString &liveryStringPrefix();
//! swift livery string //! swift livery string
static bool isSwiftLiyeryString(const QString &liveryString); static bool isSwiftLiveryString(const QString &liveryString);
//! Split swift network string //! Split swift network string
//! \sa getSwiftLiveryString //! \sa getSwiftLiveryString