qtmobility/src/contacts/requests/qcontactrelationshipremoverequest.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
child 15 1f895d8a5b2b
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
    53 
    53 
    54   For a QContactRelationshipRemoveRequest, the resultsUpdated() signal will be emitted when
    54   For a QContactRelationshipRemoveRequest, the resultsUpdated() signal will be emitted when
    55   the individual item errors (which may be retrieved by calling errorMap()) are updated, or if the overall
    55   the individual item errors (which may be retrieved by calling errorMap()) are updated, or if the overall
    56   operation error (which may be retrieved by calling error()) is updated.
    56   operation error (which may be retrieved by calling error()) is updated.
    57 
    57 
       
    58   Please see the class documentation of QContactAbstractRequest for more information about
       
    59   the usage of request classes and ownership semantics.
       
    60 
    58   \ingroup contacts-requests
    61   \ingroup contacts-requests
    59  */
    62  */
    60 
    63 
    61 /*! Constructs a new relationship remove request whose parent is the specified \a parent */
    64 /*! Constructs a new relationship remove request whose parent is the specified \a parent */
    62 QContactRelationshipRemoveRequest::QContactRelationshipRemoveRequest(QObject* parent)
    65 QContactRelationshipRemoveRequest::QContactRelationshipRemoveRequest(QObject* parent)
    72   \endcode
    75   \endcode
    73  */
    76  */
    74 void QContactRelationshipRemoveRequest::setRelationship(const QContactRelationship& relationship)
    77 void QContactRelationshipRemoveRequest::setRelationship(const QContactRelationship& relationship)
    75 {
    78 {
    76     Q_D(QContactRelationshipRemoveRequest);
    79     Q_D(QContactRelationshipRemoveRequest);
       
    80     QMutexLocker ml(&d->m_mutex);
    77     d->m_relationships.clear();
    81     d->m_relationships.clear();
    78     d->m_relationships.append(relationship);
    82     d->m_relationships.append(relationship);
    79 }
    83 }
    80 
    84 
    81 /*! Sets the list of relationships which will be removed to \a relationships */
    85 /*! Sets the list of relationships which will be removed to \a relationships */
    82 void QContactRelationshipRemoveRequest::setRelationships(const QList<QContactRelationship>& relationships)
    86 void QContactRelationshipRemoveRequest::setRelationships(const QList<QContactRelationship>& relationships)
    83 {
    87 {
    84     Q_D(QContactRelationshipRemoveRequest);
    88     Q_D(QContactRelationshipRemoveRequest);
       
    89     QMutexLocker ml(&d->m_mutex);
    85     d->m_relationships = relationships;
    90     d->m_relationships = relationships;
    86 }
    91 }
    87 
    92 
    88 /*! Returns the list of relationships which will be removed */
    93 /*! Returns the list of relationships which will be removed */
    89 QList<QContactRelationship> QContactRelationshipRemoveRequest::relationships() const
    94 QList<QContactRelationship> QContactRelationshipRemoveRequest::relationships() const
    90 {
    95 {
    91     Q_D(const QContactRelationshipRemoveRequest);
    96     Q_D(const QContactRelationshipRemoveRequest);
       
    97     QMutexLocker ml(&d->m_mutex);
    92     return d->m_relationships;
    98     return d->m_relationships;
    93 }
    99 }
    94 
   100 
    95 /*! Returns the map of input contact list indices to errors which occurred */
   101 /*! Returns the map of input contact list indices to errors which occurred */
    96 QMap<int, QContactManager::Error> QContactRelationshipRemoveRequest::errorMap() const
   102 QMap<int, QContactManager::Error> QContactRelationshipRemoveRequest::errorMap() const
    97 {
   103 {
    98     Q_D(const QContactRelationshipRemoveRequest);
   104     Q_D(const QContactRelationshipRemoveRequest);
       
   105     QMutexLocker ml(&d->m_mutex);
    99     return d->m_errors;
   106     return d->m_errors;
   100 }
   107 }
   101 
   108 
   102 #include "moc_qcontactrelationshipremoverequest.cpp"
   109 #include "moc_qcontactrelationshipremoverequest.cpp"
   103 
   110