Skip to content

Commit

Permalink
[qtcontacts-sqlite] Add a fallback to company name when synthesizing …
Browse files Browse the repository at this point in the history
…a display label. Fixes JB#47084
  • Loading branch information
adenexter committed Nov 1, 2019
1 parent 7fd4ead commit e744bab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engine/contactsengine.cpp
Expand Up @@ -1442,6 +1442,12 @@ QString ContactsEngine::synthesizedDisplayLabel(const QContact &contact, QContac
}
}

foreach (const QContactOrganization& organization, contact.details<QContactOrganization>()) {
if (!organization.name().isEmpty()) {
return organization.name();
}
}

foreach (const QContactOnlineAccount& account, contact.details<QContactOnlineAccount>()) {
if (!account.accountUri().isEmpty()) {
return account.accountUri();
Expand Down

0 comments on commit e744bab

Please sign in to comment.