some fixes

* as of slack discussion with MG, made area finding a bit more robust
* removed unused function in keypadarea
* added unit test subproject for GUI
This commit is contained in:
Klaus Basan
2015-07-13 19:20:31 +02:00
committed by Mathew Sutcliffe
parent 03e16e37e7
commit f8c83ce2a3
15 changed files with 230 additions and 19 deletions

View File

@@ -150,14 +150,14 @@ namespace BlackMisc
bool CAircraftIcaoCode::isValidDesignator(const QString &designator)
{
static QRegularExpression regexp("^[A-Z]+[A-Z0-9]*$");
static const QRegularExpression regexp("^[A-Z]+[A-Z0-9]*$");
if (designator.length() < 2 || designator.length() > 5) { return false; }
return (regexp.match(designator).hasMatch());
}
bool CAircraftIcaoCode::isValidCombinedType(const QString &combinedType)
{
static QRegularExpression regexp("^[A-Z][0-9][A-Z]$");
static const QRegularExpression regexp("^[A-Z][0-9][A-Z]$");
if (combinedType.length() != 3) return false;
return (regexp.match(combinedType).hasMatch());
}