1
0
Fork 0

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:
James Turner 2020-04-22 15:15:50 +01:00
parent 61808019a0
commit aae2ddd7e4

View file

@ -48,7 +48,7 @@ void AircraftProxyModel::setAircraftFilterString(QString s)
m_filterProps = new SGPropertyNode;
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());
}