Launcher: split on non-word characters in search
This means ‘pa-28’ or ‘c-130’ will match pa28 or c130, where previously they did not. This makes search for aircraft designations a bit easier.
This commit is contained in:
parent
61808019a0
commit
aae2ddd7e4
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ void AircraftProxyModel::setAircraftFilterString(QString s)
|
||||||
|
|
||||||
m_filterProps = new SGPropertyNode;
|
m_filterProps = new SGPropertyNode;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Q_FOREACH(QString term, s.split(' ')) {
|
Q_FOREACH(QString term, s.split(QRegExp("\\W+"), QString::SkipEmptyParts)) {
|
||||||
m_filterProps->getNode("all-of/text", index++, true)->setStringValue(term.toStdString());
|
m_filterProps->getNode("all-of/text", index++, true)->setStringValue(term.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue