Changeset View
Changeset View
Standalone View
Standalone View
src/personssortfilterproxymodel.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 54 | { | |||
---|---|---|---|---|---|
62 | const AbstractContact::Ptr contact = idx.data(KPeople::PersonsModel::PersonVCardRole).value<AbstractContact::Ptr>(); | 62 | const AbstractContact::Ptr contact = idx.data(KPeople::PersonsModel::PersonVCardRole).value<AbstractContact::Ptr>(); | ||
63 | Q_ASSERT(contact); | 63 | Q_ASSERT(contact); | ||
64 | 64 | | |||
65 | // Don't filter if no keys are set | 65 | // Don't filter if no keys are set | ||
66 | if (d->m_keys.isEmpty()) { | 66 | if (d->m_keys.isEmpty()) { | ||
67 | return true; | 67 | return true; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | foreach(const QString &key, d->m_keys) { | 70 | for(const QString &key : qAsConst(d->m_keys)) { | ||
71 | if (!contact->customProperty(key).isNull()) { | 71 | if (!contact->customProperty(key).isNull()) { | ||
72 | return true; | 72 | return true; | ||
73 | } | 73 | } | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | return false; | 76 | return false; | ||
77 | } | 77 | } | ||
78 | 78 | | |||
79 | } | 79 | } |