equal
deleted
inserted
replaced
61 QContactFetchRequest::QContactFetchRequest() |
61 QContactFetchRequest::QContactFetchRequest() |
62 : QContactAbstractRequest(new QContactFetchRequestPrivate) |
62 : QContactAbstractRequest(new QContactFetchRequestPrivate) |
63 { |
63 { |
64 } |
64 } |
65 |
65 |
66 /*! Cleans up the memory in use by this contact fetch request */ |
|
67 QContactFetchRequest::~QContactFetchRequest() |
|
68 { |
|
69 } |
|
70 |
|
71 /*! Sets the contact filter used to determine which contacts will be retrieved to \a filter */ |
66 /*! Sets the contact filter used to determine which contacts will be retrieved to \a filter */ |
72 void QContactFetchRequest::setFilter(const QContactFilter& filter) |
67 void QContactFetchRequest::setFilter(const QContactFilter& filter) |
73 { |
68 { |
74 Q_D(QContactFetchRequest); |
69 Q_D(QContactFetchRequest); |
75 d->m_filter = filter; |
70 d->m_filter = filter; |
80 { |
75 { |
81 Q_D(QContactFetchRequest); |
76 Q_D(QContactFetchRequest); |
82 d->m_sorting = sorting; |
77 d->m_sorting = sorting; |
83 } |
78 } |
84 |
79 |
85 /*! Sets the list of allowable detail definition names to \a definitionNames. Any contacts retrieved |
80 /*! |
86 by the request will have any details whose definition name is not on the restricted list |
81 Sets the fetch hint which may be used by the backend to optimize contact retrieval |
87 removed prior to being returned. */ |
82 to \a fetchHint. A client should not make changes to a contact which has been retrieved |
88 void QContactFetchRequest::setDefinitionRestrictions(const QStringList& definitionNames) |
83 using a fetch hint other than the default fetch hint. Doing so will result in information |
|
84 loss when saving the contact back to the manager (as the "new" restricted contact will |
|
85 replace the previously saved contact in the backend). |
|
86 \sa QContactFetchHint |
|
87 */ |
|
88 void QContactFetchRequest::setFetchHint(const QContactFetchHint &fetchHint) |
89 { |
89 { |
90 Q_D(QContactFetchRequest); |
90 Q_D(QContactFetchRequest); |
91 d->m_definitionRestrictions = definitionNames; |
91 d->m_fetchHint = fetchHint; |
92 } |
92 } |
93 |
93 |
94 /*! Returns the filter that will be used to select contacts to be returned */ |
94 /*! Returns the filter that will be used to select contacts to be returned */ |
95 QContactFilter QContactFetchRequest::filter() const |
95 QContactFilter QContactFetchRequest::filter() const |
96 { |
96 { |
103 { |
103 { |
104 Q_D(const QContactFetchRequest); |
104 Q_D(const QContactFetchRequest); |
105 return d->m_sorting; |
105 return d->m_sorting; |
106 } |
106 } |
107 |
107 |
108 /*! Returns the list of definition names which define which details contacts in the result list will be limited to */ |
108 /*! |
109 QStringList QContactFetchRequest::definitionRestrictions() const |
109 Returns the fetch hint which may be used by the backend to optimize contact retrieval. |
|
110 A client should not make changes to a contact which has been retrieved |
|
111 using a fetch hint other than the default fetch hint. Doing so will result in information |
|
112 loss when saving the contact back to the manager (as the "new" restricted contact will |
|
113 replace the previously saved contact in the backend). |
|
114 \sa QContactFetchHint |
|
115 */ |
|
116 QContactFetchHint QContactFetchRequest::fetchHint() const |
110 { |
117 { |
111 Q_D(const QContactFetchRequest); |
118 Q_D(const QContactFetchRequest); |
112 return d->m_definitionRestrictions; |
119 return d->m_fetchHint; |
113 } |
120 } |
114 |
121 |
115 /*! Returns the list of contacts retrieved by this request */ |
122 /*! Returns the list of contacts retrieved by this request */ |
116 QList<QContact> QContactFetchRequest::contacts() const |
123 QList<QContact> QContactFetchRequest::contacts() const |
117 { |
124 { |