plasma5-workspace/0003-Make-comment-section-of-the-timezones-configuration-.patch

33 lines
1.4 KiB
Diff
Raw Normal View History

From 6381dbd9b7a0f33dd024a98ef18a5143ba929b0e Mon Sep 17 00:00:00 2001
From: Imran Tatriev <itatriev@gmail.com>
Date: Thu, 10 Dec 2015 15:35:35 +0000
Subject: [PATCH 3/4] 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 5d2350505e286280dd59dd7964ea1819026150e4..2fe7b16275f623908cfcfb3bffbb9185dd55011e 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.6.2