[SCM] ktp-contact-runner packaging branch, master, updated. debian/15.12.1-2-244-g38a1f58
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 17:50:41 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-runner.git;a=commitdiff;h=9444777
The following commit has been merged in the master branch:
commit 9444777cb71966d4f833a81089ba74611c3515f7
Author: Dan Vrátil <dvratil at redhat.com>
Date: Sat May 18 21:33:04 2013 +0200
Perform foreign-character-insensitive match when matching contacts names
CCBUG: 319779
---
src/contactrunner.cpp | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/contactrunner.cpp b/src/contactrunner.cpp
index bb6ff81..7ec9655 100644
--- a/src/contactrunner.cpp
+++ b/src/contactrunner.cpp
@@ -337,8 +337,18 @@ void ContactRunner::matchContacts(Plasma::RunnerContext &context)
continue;
}
- const QString &name = contact->alias();
- if (!name.contains(contactQuery, Qt::CaseInsensitive)) {
+ const QString &normalized = contact->alias().normalized(QString::NormalizationForm_D);
+ QString t;
+ // Strip diacritics, umlauts etc
+ Q_FOREACH (const QChar &c, normalized) {
+ if (c.category() != QChar::Mark_NonSpacing
+ && c.category() != QChar::Mark_SpacingCombining
+ && c.category() != QChar::Mark_Enclosing) {
+ t.append(c);
+ }
+ }
+
+ if (!t.contains(contactQuery, Qt::CaseInsensitive)) {
const QString &id = contact->id();
if (!id.contains(contactQuery, Qt::CaseInsensitive)) {
continue;
@@ -350,7 +360,7 @@ void ContactRunner::matchContacts(Plasma::RunnerContext &context)
data.contact = contact;
match.setData(qVariantFromValue(data));
- match.setText(name + QLatin1String(" (") + account->displayName() + ')');
+ match.setText(contact->alias() + QLatin1String(" (") + account->displayName() + ')');
match.setType(Plasma::QueryMatch::ExactMatch);
KTp::Presence presence(contact->presence());
--
ktp-contact-runner packaging
More information about the pkg-kde-commits
mailing list