Commit 12832031 authored by Timur Kristóf's avatar Timur Kristóf

[libcontacts] Filter out false positive matches even if there is only one...

[libcontacts] Filter out false positive matches even if there is only one query result. Contributes to JB#38835
parent cdf40120
......@@ -2886,7 +2886,8 @@ void SeasideCache::addressRequestStateChanged(QContactAbstractRequest::State sta
const QList<QContact> &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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment