diff options
author | Matt Vogt <matthew.vogt@jollamobile.com> | 2014-06-16 18:20:31 +1000 |
---|---|---|
committer | Matthew Vogt <matthew.vogt@qinetic.com.au> | 2014-07-09 10:22:48 +0200 |
commit | b28dc2d9afb399787dd6cef589c14a34023214df (patch) | |
tree | a0fd0a64c964dc02f995b987a754ed8095d36fd6 /src/contacts/filters/qcontactrelationshipfilter_p.h | |
parent | 8f8c830c36c6839acb9d570189f64b42853ed02b (diff) |
Revert change to QContactRelationship participant types
A earlier change converted QContactRelationship first and second
properties to use QContact rather than QContactId representations.
The motivation for this change is unclear, but it resulted in
undesirable complication to the interface without obvious benefits.
This change restores the original ID-based representation for
relationships.
Change-Id: Iaeff907d11efcda0ef3ba3161ee0c3e760b0dd1a
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/contacts/filters/qcontactrelationshipfilter_p.h')
-rw-r--r-- | src/contacts/filters/qcontactrelationshipfilter_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/contacts/filters/qcontactrelationshipfilter_p.h b/src/contacts/filters/qcontactrelationshipfilter_p.h index cae1520d8..583ba87c4 100644 --- a/src/contacts/filters/qcontactrelationshipfilter_p.h +++ b/src/contacts/filters/qcontactrelationshipfilter_p.h @@ -70,7 +70,7 @@ public: QContactRelationshipFilterPrivate(const QContactRelationshipFilterPrivate& other) : QContactFilterPrivate(other), m_relationshipType(other.m_relationshipType), - m_relatedContact(other.m_relatedContact), + m_relatedContactId(other.m_relatedContactId), m_relatedContactRole(other.m_relatedContactRole) { } @@ -80,7 +80,7 @@ public: const QContactRelationshipFilterPrivate *od = static_cast<const QContactRelationshipFilterPrivate*>(other); if (m_relatedContactRole != od->m_relatedContactRole) return false; - if (m_relatedContact != od->m_relatedContact) + if (m_relatedContactId != od->m_relatedContactId) return false; if (m_relationshipType != od->m_relationshipType) return false; @@ -90,7 +90,7 @@ public: QDataStream& outputToStream(QDataStream& stream, quint8 formatVersion) const { if (formatVersion == 1) { - stream << m_relationshipType << m_relatedContact << static_cast<quint32>(m_relatedContactRole); + stream << m_relationshipType << m_relatedContactId << static_cast<quint32>(m_relatedContactRole); } return stream; } @@ -99,7 +99,7 @@ public: { if (formatVersion == 1) { quint32 role; - stream >> m_relationshipType >> m_relatedContact >> role; + stream >> m_relationshipType >> m_relatedContactId >> role; m_relatedContactRole = QContactRelationship::Role(role); } return stream; @@ -110,7 +110,7 @@ public: { dbg.nospace() << "QContactRelationshipFilter("; dbg.nospace() << "relationshipType=" << m_relationshipType << "," - << "relatedContact=" << m_relatedContact << "," + << "relatedContactId=" << m_relatedContactId << "," << "relatedContactRole=" << static_cast<quint32>(m_relatedContactRole); dbg.nospace() << ")"; return dbg.maybeSpace(); @@ -120,7 +120,7 @@ public: Q_IMPLEMENT_CONTACTFILTER_VIRTUALCTORS(QContactRelationshipFilter, QContactFilter::RelationshipFilter) QString m_relationshipType; - QContact m_relatedContact; + QContactId m_relatedContactId; QContactRelationship::Role m_relatedContactRole; }; |