mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refs #720, improved distributor and airline/livery detection
* mark data read from DB (req. for string key where existing key value is not reliable indicator for DB data) * detect distributors by part of model string * use a simplified name (no spaces, no special characters) to find a match * allow to obtain model strings (=keys) as set and list
This commit is contained in:
committed by
Mathew Sutcliffe
parent
39dae7ed45
commit
f9922353c4
@@ -12,6 +12,7 @@
|
||||
#include "stringutils.h"
|
||||
#include <QChar>
|
||||
#include <QTextCodec>
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -162,6 +163,13 @@ namespace BlackMisc
|
||||
{
|
||||
return c1.length() == c2.length() && c1.startsWith(c2, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
QString simplifyNameForSearch(const QString &name)
|
||||
{
|
||||
static const QRegularExpression reg("[^A-Z]");
|
||||
const QString r = name.toUpper().remove(reg);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
//! \endcond
|
||||
|
||||
Reference in New Issue
Block a user