From 6381dbd9b7a0f33dd024a98ef18a5143ba929b0e Mon Sep 17 00:00:00 2001 From: Imran Tatriev Date: Thu, 10 Dec 2015 15:35:35 +0000 Subject: [PATCH 03/10] Make "comment" section of the timezones configuration searchable BUG: 354238 REVIEW: 126302 FIXED-IN: 5.5.1 --- applets/digital-clock/plugin/timezonemodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/applets/digital-clock/plugin/timezonemodel.cpp b/applets/digital-clock/plugin/timezonemodel.cpp index 5d23505..2fe7b16 100644 --- a/applets/digital-clock/plugin/timezonemodel.cpp +++ b/applets/digital-clock/plugin/timezonemodel.cpp @@ -40,8 +40,10 @@ bool TimeZoneFilterProxy::filterAcceptsRow(int source_row, const QModelIndex &so const QString city = sourceModel()->index(source_row, 0, source_parent).data(TimeZoneModel::CityRole).toString(); const QString region = sourceModel()->index(source_row, 0, source_parent).data(TimeZoneModel::RegionRole).toString(); + const QString comment = sourceModel()->index(source_row, 0, source_parent).data(TimeZoneModel::CommentRole).toString(); - if (m_stringMatcher.indexIn(city) != -1 || m_stringMatcher.indexIn(region) != -1) { + if (m_stringMatcher.indexIn(city) != -1 || m_stringMatcher.indexIn(region) != -1 || + m_stringMatcher.indexIn(comment) != -1) { return true; } -- 2.5.0