From 12832031a29fb9575271d87a30a845c9adde3454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Tue, 30 Jul 2019 17:33:52 +0200 Subject: [PATCH] [libcontacts] Filter out false positive matches even if there is only one query result. Contributes to JB#38835 --- src/seasidecache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/seasidecache.cpp b/src/seasidecache.cpp index 44913c3..bb8f288 100644 --- a/src/seasidecache.cpp +++ b/src/seasidecache.cpp @@ -2886,7 +2886,8 @@ void SeasideCache::addressRequestStateChanged(QContactAbstractRequest::State sta const QList &resolvedContacts = it.key()->contacts(); if (!resolvedContacts.isEmpty()) { - if (resolvedContacts.count() == 1) { + if (resolvedContacts.count() == 1 && data.first != QString()) { + // Return the result because it is the only resolved contact; however still filter out false positive phone number matches item = itemById(apiId(resolvedContacts.first()), false); } else { // Lookup the result in our updated indexes