From aae2ddd7e4c40baf6e978e69f13d8985f5a58024 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 22 Apr 2020 15:15:50 +0100 Subject: [PATCH] Launcher: split on non-word characters in search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/GUI/AircraftSearchFilterModel.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUI/AircraftSearchFilterModel.cxx b/src/GUI/AircraftSearchFilterModel.cxx index 6b5aac3d5..4cbc45331 100644 --- a/src/GUI/AircraftSearchFilterModel.cxx +++ b/src/GUI/AircraftSearchFilterModel.cxx @@ -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()); }