on xenial help sign in
match the timezone name at the beginning only
commitc823f1a765e3b698becff974739e640b933ca3b7 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 7 Sep 2015, 21:19 (11 years ago) parentb3c671c
1 file changed+1−1
plugins/Wizard/timezonemodel.cpp+1−1
plugins/Wizard/timezonemodel.cpp+1−1
@@ -125,7 +125,7 @@ bool TimeZoneFilterModel::filterAcceptsRow(int row, const QModelIndex &parentInd
125125 const QString city = sourceModel()->index(row, 0, parentIndex).data(TimeZoneModel::City).toString();
126126 const QString country = sourceModel()->index(row, 0, parentIndex).data(TimeZoneModel::Country).toString();
127127
128− if (m_stringMatcher.indexIn(city) != -1 || m_stringMatcher.indexIn(country) != -1) {
128+ if (m_stringMatcher.indexIn(city) == 0 || m_stringMatcher.indexIn(country) == 0) { // match at the beginning of the city/country name
129129 return true;
130130 }
131131 } else if (!m_country.isEmpty()) { // filter by country code