summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-24 11:11:39 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-24 11:11:39 -0800
commitdabb6b2033a22d02c8dad7313ea12515fd893033 (patch)
treee640fc213de3579b929b5a615f2de84193b4d5e8 /desktop-widgets/locationinformation.cpp
parent2c77aa55194053eced380310629a5cb9fcefb2c8 (diff)
downloadsubsurface-dabb6b2033a22d02c8dad7313ea12515fd893033.tar.gz
Location completion matches on whole name
When typing in a partial location name, the match now considers the whole text, not just the start of the text. So typing in "Yell" will match both "Yellow House" and "Mellow Yellow". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r--desktop-widgets/locationinformation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index ab2235120..f23e5e863 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -290,7 +290,7 @@ bool DiveLocationFilterProxyModel::filterAcceptsRow(int source_row, const QModel
return true;
QString sourceString = sourceModel()->index(source_row, DiveLocationModel::NAME).data(Qt::DisplayRole).toString();
- return sourceString.toLower().startsWith(location_line_edit->text().toLower());
+ return sourceString.toLower().contains(location_line_edit->text().toLower());
}
bool DiveLocationFilterProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const