95 QContactManager::~QContactManager() |
95 QContactManager::~QContactManager() |
96 { |
96 { |
97 |
97 |
98 } |
98 } |
99 |
99 |
100 QList<QContactLocalId> QContactManager::contacts( |
100 QList<QContactLocalId> QContactManager::contactIds( |
101 const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders) const |
101 const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders) const |
102 { |
102 { |
103 Q_UNUSED(filter) |
103 Q_UNUSED(filter) |
104 Q_UNUSED(sortOrders) |
104 Q_UNUSED(sortOrders) |
105 QList<QContactLocalId> list; |
105 QList<QContactLocalId> list; |
106 if ( QString("11112222").endsWith(logsTestNumber) ){ |
106 QString matchNum = logsTestNumber; |
|
107 // simulate contact API behavior |
|
108 if ( matchNum.length() > 4 && matchNum.startsWith('+') ){ |
|
109 matchNum.remove(0,4); |
|
110 } |
|
111 if ( QString("11112222").endsWith(matchNum) ){ |
107 list.append( logsTestContactId ); |
112 list.append( logsTestContactId ); |
108 } |
113 } |
109 return list; |
114 return list; |
110 } |
115 } |
111 |
116 |
112 QList<QContactLocalId> QContactManager::contactIds( |
|
113 const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders) const |
|
114 { |
|
115 Q_UNUSED(filter) |
|
116 Q_UNUSED(sortOrders) |
|
117 QList<QContactLocalId> list; |
|
118 if ( QString("11112222").endsWith(logsTestNumber) ){ |
|
119 list.append( logsTestContactId ); |
|
120 } |
|
121 return list; |
|
122 } |
|
123 |
|
124 QContact QContactManager::contact(const QContactLocalId& contactId, const QStringList& definitionRestrictions) const |
117 QContact QContactManager::contact(const QContactLocalId& contactId, const QStringList& definitionRestrictions) const |
125 { |
118 { |
126 Q_UNUSED(definitionRestrictions) |
119 Q_UNUSED(definitionRestrictions) |
|
120 QContact contact; |
|
121 if ( contactId == logsTestContactId ) { |
|
122 logsTestContactLocalId = logsTestContactId; |
|
123 } |
|
124 return contact; |
|
125 } |
|
126 |
|
127 QContact QContactManager::contact(const QContactLocalId& contactId, const QContactFetchHint& fetchHint) const |
|
128 { |
|
129 Q_UNUSED(fetchHint) |
127 QContact contact; |
130 QContact contact; |
128 if ( contactId == logsTestContactId ) { |
131 if ( contactId == logsTestContactId ) { |
129 logsTestContactLocalId = logsTestContactId; |
132 logsTestContactLocalId = logsTestContactId; |
130 } |
133 } |
131 return contact; |
134 return contact; |