From ce33709254e8e3259c9e42fd4677f2a989d4eb16 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 16 Jul 2019 00:59:44 +0200 Subject: [PATCH] Style, typo --- src/blackcore/airspacemonitor.cpp | 2 +- src/blackmisc/aviation/livery.cpp | 20 ++++++++++---------- src/blackmisc/simulation/aircraftmodel.cpp | 9 +++++---- src/blackmisc/simulation/aircraftmodel.h | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/blackcore/airspacemonitor.cpp b/src/blackcore/airspacemonitor.cpp index c26e6d735..cb7ef869d 100644 --- a/src/blackcore/airspacemonitor.cpp +++ b/src/blackcore/airspacemonitor.cpp @@ -953,7 +953,7 @@ namespace BlackCore // model found lookupModel.setCallsign(callsign); - // Script + // script if (runMatchinScript && setup.doRunMsReverseLookupScript()) { const MatchingScriptReturnValues rv = CAircraftMatcher::reverseLookupScript(lookupModel, setup, log); diff --git a/src/blackmisc/aviation/livery.cpp b/src/blackmisc/aviation/livery.cpp index 2423978d1..e1961ab8a 100644 --- a/src/blackmisc/aviation/livery.cpp +++ b/src/blackmisc/aviation/livery.cpp @@ -355,12 +355,12 @@ namespace BlackMisc const ColumnIndex i = index.frontCasted(); switch (i) { - case IndexDescription: return CVariant::fromValue(m_description); case IndexAirlineIcaoCode: return m_airline.propertyByIndex(index.copyFrontRemoved()); - case IndexColorFuselage: return m_colorFuselage.propertyByIndex(index.copyFrontRemoved());; - case IndexColorTail: return m_colorTail.propertyByIndex(index.copyFrontRemoved()); - case IndexCombinedCode: return CVariant::fromValue(m_combinedCode); - case IndexIsMilitary: return CVariant::fromValue(m_military); + case IndexColorFuselage: return m_colorFuselage.propertyByIndex(index.copyFrontRemoved());; + case IndexColorTail: return m_colorTail.propertyByIndex(index.copyFrontRemoved()); + case IndexDescription: return CVariant::fromValue(m_description); + case IndexCombinedCode: return CVariant::fromValue(m_combinedCode); + case IndexIsMilitary: return CVariant::fromValue(m_military); default: return CValueObject::propertyByIndex(index); } } @@ -372,12 +372,12 @@ namespace BlackMisc const ColumnIndex i = index.frontCasted(); 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 IndexColorFuselage: m_colorFuselage.setPropertyByIndex(index.copyFrontRemoved(), variant); break; - case IndexColorTail: m_colorTail.setPropertyByIndex(index.copyFrontRemoved(), variant); break; - case IndexCombinedCode: this->setCombinedCode(variant.toQString(false)); break; - case IndexIsMilitary: this->setMilitary(variant.toBool()); break; + case IndexColorFuselage: m_colorFuselage.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexColorTail: m_colorTail.setPropertyByIndex(index.copyFrontRemoved(), variant); break; + case IndexCombinedCode: this->setCombinedCode(variant.toQString(false)); break; + case IndexIsMilitary: this->setMilitary(variant.toBool()); break; default: CValueObject::setPropertyByIndex(index, variant); break; } } diff --git a/src/blackmisc/simulation/aircraftmodel.cpp b/src/blackmisc/simulation/aircraftmodel.cpp index c7d1a0141..a89a290b7 100644 --- a/src/blackmisc/simulation/aircraftmodel.cpp +++ b/src/blackmisc/simulation/aircraftmodel.cpp @@ -8,6 +8,7 @@ #include "matchingutils.h" #include "aircraftmodel.h" +#include "blackmisc/aviation/logutils.h" #include "blackmisc/db/datastoreutility.h" #include "blackmisc/comparefunctions.h" #include "blackmisc/fileutils.h" @@ -495,8 +496,8 @@ namespace BlackMisc { switch (this->getModelMode()) { - case Include: return CIcon::iconByIndex(CIcons::ModelInclude); - case Exclude: return CIcon::iconByIndex(CIcons::ModelExclude); + case Include: return CIcon::iconByIndex(CIcons::ModelInclude); + case Exclude: return CIcon::iconByIndex(CIcons::ModelExclude); case Undefined: return CIcon::iconByIndex(CIcons::StandardIconUnknown16); default: Q_ASSERT_X(false, Q_FUNC_INFO, "wrong mode"); @@ -580,7 +581,7 @@ namespace BlackMisc return p; } - bool CAircraftModel::isSwiftLiyeryString(const QString &liveryString) + bool CAircraftModel::isSwiftLiveryString(const QString &liveryString) { return (liveryString.length() > liveryStringPrefix().length() && liveryString.startsWith(liveryStringPrefix(), Qt::CaseInsensitive)); } @@ -598,7 +599,7 @@ namespace BlackMisc DBTripleIds CAircraftModel::parseNetworkLiveryString(const QString &liveryString) { // "swift_m22l33a11" - if (!CAircraftModel::isSwiftLiyeryString(liveryString)) {return DBTripleIds(); } + if (!CAircraftModel::isSwiftLiveryString(liveryString)) { return DBTripleIds(); } DBTripleIds ids; const QString ls = liveryString.mid(liveryStringPrefix().length()).toLower(); diff --git a/src/blackmisc/simulation/aircraftmodel.h b/src/blackmisc/simulation/aircraftmodel.h index 8bf62c22a..04a555500 100644 --- a/src/blackmisc/simulation/aircraftmodel.h +++ b/src/blackmisc/simulation/aircraftmodel.h @@ -80,7 +80,7 @@ namespace BlackMisc enum ModelType { TypeUnknown, - TypeQueriedFromNetwork, //!< model was queried by network protocol + TypeQueriedFromNetwork, //!< model was queried by network protocol (ICAO data) TypeFSInnData, //!< model based on FSD ICAO data TypeReverseLookup, //!< reverse lookup model TypeModelMatching, //!< model is result of model matching @@ -530,7 +530,7 @@ namespace BlackMisc static const QString &liveryStringPrefix(); //! swift livery string - static bool isSwiftLiyeryString(const QString &liveryString); + static bool isSwiftLiveryString(const QString &liveryString); //! Split swift network string //! \sa getSwiftLiveryString