From ea9303ff3cff8ea7c353b8a0c53e13e82f897360 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 24 Nov 2015 11:11:39 -0800 Subject: 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 --- qt-ui/locationinformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index aee0b7328..8e40e1b53 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/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 -- cgit v1.2.3-70-g09d2