Ref T637, allow 3 letter ICAOs in FP

* strict or lenient airport check
* allow to enter 3 letter ICAO codes in FP
This commit is contained in:
Klaus Basan
2019-04-27 20:00:47 +02:00
parent 0eed0f0f00
commit c56775e815
9 changed files with 54 additions and 18 deletions

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
bool isEmpty() const { return this->m_icaoCode.isEmpty(); }
//! Has valid code?
bool hasValidIcaoCode() const;
bool hasValidIcaoCode(bool strict) const;
//! Get code.
const QString &asString() const { return this->m_icaoCode; }
@@ -56,7 +56,7 @@ namespace BlackMisc
static QString unifyAirportCode(const QString &icaoCode);
//! Valid ICAO designator
static bool isValidIcaoDesignator(const QString &icaoCode);
static bool isValidIcaoDesignator(const QString &icaoCode, bool strict);
//! Containing numbers (normally indicator for small airfield/strip)
static bool containsNumbers(const QString &icaoCode);
@@ -73,6 +73,9 @@ namespace BlackMisc
//! \copydoc BlackMisc::Mixin::Index::comparePropertyByIndex
int comparePropertyByIndex(const CPropertyIndex &index, const CAirportIcaoCode &compareValue) const;
//! Valid code lenght
static bool validCodeLength(int l, bool strict);
private:
QString m_icaoCode;