From dabb6b2033a22d02c8dad7313ea12515fd893033 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 --- desktop-widgets/locationinformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') 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 -- cgit v1.2.3-70-g09d2