diff options
Diffstat (limited to 'src/contacts/qcontact.cpp')
-rw-r--r-- | src/contacts/qcontact.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/contacts/qcontact.cpp b/src/contacts/qcontact.cpp index d35d6c13be..725df56215 100644 --- a/src/contacts/qcontact.cpp +++ b/src/contacts/qcontact.cpp @@ -176,7 +176,7 @@ bool QContact::isEmpty() const /*! * Removes all details of the contact. - * This function does not modify the id or type of the contact. + * This function does not modify the id of the contact. * Calling isEmpty() after calling this function will return true. * \since 1.0 */ @@ -979,7 +979,12 @@ QMap<QString, QContactDetail> QContact::preferredDetails() const QMap<QString, QContactDetail> ret; QMap<QString, int>::const_iterator it = d->m_preferences.constBegin(); while (it != d->m_preferences.constEnd()) { - ret.insert(it.key(), d->m_details.at(it.value())); + foreach(QContactDetail detail, d->m_details) { + if (detail.d->m_id == it.value()) { + ret.insert(it.key(), detail); + break; + } + } ++it; } |