51 |
51 |
52 For a QContactRemoveRequest, the resultsUpdated() signal will be emitted when |
52 For a QContactRemoveRequest, the resultsUpdated() signal will be emitted when |
53 the individual item errors (which may be retrieved by calling errorMap()) are updated, or if the overall |
53 the individual item errors (which may be retrieved by calling errorMap()) are updated, or if the overall |
54 operation error (which may be retrieved by calling error()) is updated. |
54 operation error (which may be retrieved by calling error()) is updated. |
55 |
55 |
|
56 Please see the class documentation of QContactAbstractRequest for more information about |
|
57 the usage of request classes and ownership semantics. |
|
58 |
56 \ingroup contacts-requests |
59 \ingroup contacts-requests |
57 */ |
60 */ |
58 |
61 |
59 /*! Constructs a new contact remove request whose parent is the specified \a parent */ |
62 /*! Constructs a new contact remove request whose parent is the specified \a parent */ |
60 QContactRemoveRequest::QContactRemoveRequest(QObject* parent) |
63 QContactRemoveRequest::QContactRemoveRequest(QObject* parent) |
70 \endcode |
73 \endcode |
71 */ |
74 */ |
72 void QContactRemoveRequest::setContactId(const QContactLocalId& contactId) |
75 void QContactRemoveRequest::setContactId(const QContactLocalId& contactId) |
73 { |
76 { |
74 Q_D(QContactRemoveRequest); |
77 Q_D(QContactRemoveRequest); |
|
78 QMutexLocker ml(&d->m_mutex); |
75 d->m_contactIds.clear(); |
79 d->m_contactIds.clear(); |
76 d->m_contactIds.append(contactId); |
80 d->m_contactIds.append(contactId); |
77 } |
81 } |
78 |
82 |
79 /*! Sets the list of ids of contacts which will be removed to \a contactIds */ |
83 /*! Sets the list of ids of contacts which will be removed to \a contactIds */ |
80 void QContactRemoveRequest::setContactIds(const QList<QContactLocalId>& contactIds) |
84 void QContactRemoveRequest::setContactIds(const QList<QContactLocalId>& contactIds) |
81 { |
85 { |
82 Q_D(QContactRemoveRequest); |
86 Q_D(QContactRemoveRequest); |
|
87 QMutexLocker ml(&d->m_mutex); |
83 d->m_contactIds = contactIds; |
88 d->m_contactIds = contactIds; |
84 } |
89 } |
85 |
90 |
86 /*! Returns the list of ids of contacts which will be removed */ |
91 /*! Returns the list of ids of contacts which will be removed */ |
87 QList<QContactLocalId> QContactRemoveRequest::contactIds() const |
92 QList<QContactLocalId> QContactRemoveRequest::contactIds() const |
88 { |
93 { |
89 Q_D(const QContactRemoveRequest); |
94 Q_D(const QContactRemoveRequest); |
|
95 QMutexLocker ml(&d->m_mutex); |
90 return d->m_contactIds; |
96 return d->m_contactIds; |
91 } |
97 } |
92 |
98 |
93 /*! Returns the map of input contact list indices to errors which occurred */ |
99 /*! Returns the map of input contact list indices to errors which occurred */ |
94 QMap<int, QContactManager::Error> QContactRemoveRequest::errorMap() const |
100 QMap<int, QContactManager::Error> QContactRemoveRequest::errorMap() const |
95 { |
101 { |
96 Q_D(const QContactRemoveRequest); |
102 Q_D(const QContactRemoveRequest); |
|
103 QMutexLocker ml(&d->m_mutex); |
97 return d->m_errors; |
104 return d->m_errors; |
98 } |
105 } |
99 |
106 |
100 #include "moc_qcontactremoverequest.cpp" |
107 #include "moc_qcontactremoverequest.cpp" |
101 |
108 |