mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
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:
committed by
Mathew Sutcliffe
parent
03e16e37e7
commit
f8c83ce2a3
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user