Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
[libcontacts] Allow caching filter match role. Contributes to JB#47217
Browse files Browse the repository at this point in the history
This is the role whose data matched the filter pattern.
  • Loading branch information
Chris Adams committed Nov 19, 2019
1 parent 7b695fe commit d4197d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/seasidecache.h
Expand Up @@ -141,10 +141,11 @@ class CONTACTCACHE_EXPORT SeasideCache : public QObject

struct CacheItem
{
CacheItem() : itemData(0), iid(0), statusFlags(0), contactState(ContactAbsent), listeners(0) {}
CacheItem() : itemData(0), iid(0), statusFlags(0), contactState(ContactAbsent), listeners(0), filterMatchRole(-1) {}
CacheItem(const QContact &contact)
: contact(contact), itemData(0), iid(internalId(contact)),
statusFlags(contact.detail<QContactStatusFlags>().flagsValue()), contactState(ContactAbsent), listeners(0) {}
statusFlags(contact.detail<QContactStatusFlags>().flagsValue()), contactState(ContactAbsent), listeners(0),
filterMatchRole(-1) {}

QContactId apiId() const { return SeasideCache::apiId(contact); }

Expand Down Expand Up @@ -201,6 +202,7 @@ class CONTACTCACHE_EXPORT SeasideCache : public QObject
ItemListener *listeners;
QString displayLabelGroup;
QString displayLabel;
int filterMatchRole;
};

struct ContactLinkRequest
Expand Down

0 comments on commit d4197d2

Please sign in to comment.